예제 #1
0
        public bool ExecuteSpawn(string id, Vector3 position)
        {
            if (!PoolSystem.FetchAvailable(id, out GameObject gameObject))
            {
                return(false);
            }

            gameObject.transform.position = position;
            return(true);
        }
예제 #2
0
        private bool ExecuteSpawn(string id, Vector3 position, out Poolable poolable)
        {
            if (!PoolSystem.FetchAvailable(id, out GameObject gameObject))
            {
                poolable = default;
                return(false);
            }

            poolable = gameObject.GetComponentInChildren <Poolable>();
            gameObject.transform.position = position;

            return(true);
        }