예제 #1
0
        public static PoolObject InstantiateFromPool(this PoolManager.PoolManager poolManager, GameObject prefab,
                                                     Vector3 position)
        {
            var poolObject = poolManager.InstantiateFromPool(prefab);

            poolObject.Transform.position = position;
            return(poolObject);
        }
예제 #2
0
        public SoundPlayer FromFactory()
        {
            var poolObject = _poolManager.InstantiateFromPool(_soundPlayerPrefab.gameObject);

            return(poolObject.ObjectLocator.Resolve <SoundPlayer>());
        }