void Awake()
    {
        GameObject p = new GameObject("Pool_" + this.name);

        pool = p.AddComponent <NTPool>();
        pool.Initialize(prefab);

        DontDestroyOnLoad(pool);
    }
Пример #2
0
    private void Awake()
    {
        if (propertyPool == null)
        {
            GameObject p = new GameObject("PoolPropertys");
            propertyPool = p.AddComponent <NTPool>();
            propertyPool.Initialize(property.gameObject);

            DontDestroyOnLoad(propertyPool);
        }
    }