Example #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);
        }
Example #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);
        }
Example #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);
        }