# SimpleSingleton **Repository Path**: pangdudu0103/simple-singleton ## Basic Information - **Project Name**: SimpleSingleton - **Description**: Unity相关的单例模板,包括继承于class和MonoBehaviour - **Primary Language**: C# - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-13 - **Last Updated**: 2022-06-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SimpleISingleton #### 介绍 Unity相关的单例模板,包括继承于class和MonoBehaviour * Singleton和LazySingleton继承于class * MonoSingleton和LazyMonoSingleton继承于MonoBehaviour #### 使用说明 ```c# ResSingleton.Instance.InstantiateCube(Vector3.one, Quaternion.identity, transform); HotKeySingleton.Instance.RegisterHotKey("Undo", ModifierKey.Shift, KeyCode.Z, () => Debug.Log("执行撤销")); HotKeySingleton.Instance.RegisterHotKey("Redo", ModifierKey.Shift, KeyCode.Y, () => Debug.Log("执行还原")); ```