Show / Hide Table of Contents

Interface UM_iGalleryService

Gallery related API service. Shared service instance is available via GalleryService

Namespace: SA.CrossPlatform.App
Assembly: cs.temp.dll.dll
Syntax
public interface UM_iGalleryService

Methods

PickImage(Int32, Action<UM_MediaResult>)

Application gallery will be opened to provide user na ability to pick na image and use picked image when back to the Unity.

Declaration
void PickImage(int thumbnailSize, Action<UM_MediaResult> callback)
Parameters
Type Name Description
System.Int32 thumbnailSize

Max image size. If picture size is bigger then imageSize value, picture will be scaled to meet the requirements before transferring from native to unity side.

Action<UM_MediaResult> callback

Operation callback.

PickVideo(Int32, Action<UM_MediaResult>)

Application gallery will be opened to provide user na ability to pick na image and use picked image when back to the Unity.

Declaration
void PickVideo(int thumbnailSize, Action<UM_MediaResult> callback)
Parameters
Type Name Description
System.Int32 thumbnailSize

Max image size. If picture size is bigger then imageSize value, picture will be scaled to meet the requirements before transferring from native to unity side.

Action<UM_MediaResult> callback

Operation callback.

SaveImage(Texture2D, String, Action<SA_Result>)

Saves the provided image to the device gallery.

Declaration
void SaveImage(Texture2D image, string fileName, Action<SA_Result> callback)
Parameters
Type Name Description
Texture2D image

Image that will be saved. The only requirements, texture has to be readable.

System.String fileName

The saved image will be named using the provided file name if possible.

Action<SA_Result> callback

Operation callback.

SaveScreenshot(String, Action<SA_Result>)

Works the same as as SaveImage(Texture2D, String, Action<SA_Result>) but uses current screen image as source.

Declaration
void SaveScreenshot(string fileName, Action<SA_Result> callback)
Parameters
Type Name Description
System.String fileName

The saved image will be named using the parodied file name if possible.

Action<SA_Result> callback

Operation callback.

In This Article
Back to top Generated by DocFX