void Awake() { if (singletonInstance) Debug.LogError("have singletonInstance"); singletonInstance = this; foreach (zzCreatorInfo v in creatorList) { creatorMap[v.name] = v.prefab.gameObject; } }
void OnDestroy() { singletonInstance = null; }