void Awake()
    {
        if (dfPoolManager.Pool != null)
        {
            throw new Exception("Cannot have more than one instance of the " + GetType().Name + " class");
        }

        dfPoolManager.Pool = this;

        if (AutoPreload)
        {
            Preload();
        }
    }
Exemplo n.º 2
0
    void Awake()
    {
        if( dfPoolManager.Pool != null )
        {
            throw new Exception( "Cannot have more than one instance of the " + GetType().Name + " class" );
        }

        dfPoolManager.Pool = this;

        if( AutoPreload )
        {
            Preload();
        }
    }