Files
MuHua-Core/Assets/ModuleCore/ModuleScene.cs
T
2024-11-08 18:15:06 +08:00

17 lines
571 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class ModuleScene : MonoBehaviour {
protected virtual ModuleCore ModuleCore => ModuleCore.I;
protected virtual void Awake() {
//if (ModuleCore.ModuleScene != null) { Destroy(gameObject); return; }
//ModuleCore.ModuleScene = this;
//DontDestroyOnLoad(gameObject);
}
public virtual void LoadSceneAsync(string scene) {
StartCoroutine(ILoadSceneAsync(scene));
}
public abstract IEnumerator ILoadSceneAsync(string scene);
}