capture memory snapshot when the application quit
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); }
public void QuitApplication() { Application.Quit(); } }