Photo Gallery
Author:
admin
359 views
Workflow
Functional photo gallery app which supports showing the images from the library.
Photo Gallery app depends on its manager and photo items. Photos can be added or edited by using the ‘Photo Gallery Manager’ component – which is attached to the app window. All items will be generated at runtime.
Scripting
using UnityEngine;
using Michsky.DreamOS; // DreamOS namespace
public class SampleClass : MonoBehaviour
{
[SerializeField] private PhotoGalleryManager photoApp; // App variable
void YourFunction()
{
// Open photo by index
photoApp.OpenPhoto(index);
// Open photo by title
photoApp.OpenPhoto("Photo Title");
// Open custom photo
photoApp.OpenPhoto(Sprite photo, "Title", "Description");
// Create photo
photoApp.CreatePhoto(Sprite photo, "Title", "Description");
// Delete photo by index
photoApp.DeletePhoto(index);
// Delete photo by title
photoApp.DeletePhoto("Photo Title");
}
}