void Awake() { GameObject p = new GameObject("Pool_" + this.name); pool = p.AddComponent <NTPool>(); pool.Initialize(prefab); DontDestroyOnLoad(pool); }
private void Awake() { if (propertyPool == null) { GameObject p = new GameObject("PoolPropertys"); propertyPool = p.AddComponent <NTPool>(); propertyPool.Initialize(property.gameObject); DontDestroyOnLoad(propertyPool); } }