// keep it alive while racing... private void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
private void InitializeAppURLLauncher(bool isEnabled) { if (!isEnabled) { return; } #if UNITY_IOS Application.targetFrameRate = 60; #endif #if UNITY_ANDROID if (Application.platform == RuntimePlatform.Android) { Application.targetFrameRate = 60; } #endif #if UNITY_IOS || UNITY_EDITOR urlSchemeHandler = GameObject.FindObjectOfType <URLSchemeHandler>(); urlSchemeHandler.OnLaunchUrlEvent += OnLaunchUrlEvent; #endif }