| sceneSwitchCallbackOnQuit | Callback which will be executed when the application was quitting |
| sceneSwitchCallbackTimeout | The timeout wait to load scene. |
Subscribe callback for capturing memory snapshots
using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.OpenHarmony;
public class MemorySnapshotExample : MonoBehaviour { private void Start() { OpenHarmonyMemorySnapshot.SubscribeHandler(() => { var asyncOperation = SceneManager.LoadSceneAsync("Login"); asyncOperation.allowSceneActivation = true; asyncOperation.completed += (operation) => { //capture memory snapshot when the scene loading is completed. OpenHarmonyMemorySnapshot.CaptureMemorySnapshot(); }; }, 5000); }
public void QuitApplication() { Application.Quit(); } }