[유니티 스크립트 소스] 싱글톤(Singleton) 2
2022. 6. 16.
using UnityEngine; using System; using UnityEngine.SceneManagement; /// /// Singleton attribute work with singleton class. /// public class SingletonAttribute : Attribute { //Tell if this singleton has to create himself if he is called and not present in the scene. public bool createIfNotPresent; public SingletonAttribute(bool b) { createIfNotPresent = b; } } /// /// Be aware this will not preve..