public override void OnInspectorGUI() { DrawDefaultInspector(); SignalObject signal = (SignalObject)target; if (GUILayout.Button("Call Signal")) { signal.CallSignal(); } }
IEnumerator LoadAsync() { load = SceneManager.LoadSceneAsync(sceneName, LoadSceneMode.Additive); load.allowSceneActivation = false; while (load.progress < 0.9f) { yield return(null); } if (onSceneReadySignal != null) { onSceneReadySignal.CallSignal(); } Debug.Log("Loaded: " + sceneName); }