>Unsubscribe callback for capturing memory snapshots
using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.OpenHarmony;
public class MemorySnapshotExample : MonoBehaviour { private void Start() { OpenHarmonyMemorySnapshot.SubscribeHandler(() => { SceneManager.LoadScene("Login"); //capture memory snapshot when the scene loading is completed. OpenHarmonyMemorySnapshot.CaptureMemorySnapshot(); }, 5000);
OpenHarmonyMemorySnapshot.UnsubscribeHandler(); }
public void QuitApplication() { Application.Quit(); } }