| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- namespace ETHotfix
- {
- public static class Game
- {
- private static Scene scene;
- public static Scene Scene
- {
- get
- {
- if (scene != null)
- {
- return scene;
- }
- scene = new Scene() { Name = "ClientHotfix" };
- scene.GameObject.transform.SetParent(scene.GameObject.transform.Find("/Global"));
- return scene;
- }
- }
- private static EventSystem eventSystem;
- public static EventSystem EventSystem
- {
- get
- {
- return eventSystem ?? (eventSystem = new EventSystem());
- }
- }
- private static ObjectPool objectPool;
- public static ObjectPool ObjectPool
- {
- get
- {
- return objectPool ?? (objectPool = new ObjectPool());
- }
- }
- public static void Close()
- {
- scene.Dispose();
- scene = null;
- eventSystem = null;
- objectPool = null;
- }
- }
- }
|