Пример #1
0
        public GameObject Instantiate(string ID, Transform parent, bool worldPositionStays)
        {
            PrefabMap map = Array.Find(Prefabs, p => p.ID == ID);

            return((!map.Equals(default(PrefabMap)))
                                ? GameObject.Instantiate <GameObject>(map.Prefab, parent, worldPositionStays) : null);
        }
Пример #2
0
        public GameObject Instantiate(string ID, Vector3 position, Quaternion rotation, Transform parent)
        {
            PrefabMap map = Array.Find(Prefabs, p => p.ID == ID);

            return((!map.Equals(default(PrefabMap)))
                                ? GameObject.Instantiate <GameObject>(map.Prefab, position, rotation, parent) : null);
        }
Пример #3
0
        public GameObject Instantiate(string ID)
        {
            PrefabMap map = Array.Find(Prefabs, p => p.ID == ID);

            return((!map.Equals(default(PrefabMap)))
                                ? GameObject.Instantiate <GameObject>(map.Prefab) : null);
        }