Version: 1.7
LanguageEnglish
  • C#

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Parameters

gallerySelectCallback Callback which will be executed when select images finished.
maxPhotoSelectNumber The max number of images that can be selected.
isPhotoTakingSupported Whether the GallerySelector support photo taking.
width The decoding width. Use origin width if set to 0.
height The decoding height. Use origin height if set to 0.

Description

Open the GallerySelector that allows user to select images from gallery..

using UnityEngine;
using UnityEngine.OpenHarmony;

public class OpenSelectorScript : MonoBehaviour { void Start() { Gallery.OpenImagesSelector((textures) => { Debug.Log($"Retrive {textures.Count} images!"); }, 9, false, 0, 0); } }