private void Awake() { if (Instance != null && Instance != this) { Destroy(gameObject); } else { Instance = this; } }
void Singleton() { if (instance == null || instance != this) { instance = this; } else if (instance == this) { Destroy(gameObject); } }
private void OnEnable() { _poolMan = (SimplePoolManager)target; _getTarget = new SerializedObject(_poolMan); _thisList = _getTarget.FindProperty("Pools"); _expandBool = _getTarget.FindProperty("ExpandIfEmpty"); _activeObjects = _getTarget.FindProperty("ActiveObjects"); _inactiveObjects = _getTarget.FindProperty("InactiveObjects"); _totalPooledObjects = _getTarget.FindProperty("TotalPooledObjects"); _showPool = new List <bool>(); _showPools = new List <bool>(); }
private void Start() { Instance = this; _poolMan = SimplePoolManager.Instance; }