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