using System; using UnityEngine; using UnityEngine.SceneManagement; namespace Unity.Netcode { /// /// Used to override the LoadSceneAsync and UnloadSceneAsync methods called /// within the NetworkSceneManager. /// internal interface ISceneManagerHandler { // Generic action to call when a scene is finished loading/unloading struct SceneEventAction { internal uint SceneEventId; internal Action EventAction; /// /// Used server-side for integration testing in order to /// invoke the SceneEventProgress once done loading /// internal Action Completed; internal void Invoke() { Completed?.Invoke(); EventAction.Invoke(SceneEventId); } } AsyncOperation LoadSceneAsync(string sceneName, LoadSceneMode loadSceneMode, SceneEventAction sceneEventAction); AsyncOperation UnloadSceneAsync(Scene scene, SceneEventAction sceneEventAction); } }