void Update()
        {
            if (!Application.isPlaying && gameObject.scene != null && prefabSet != null)
            {
                if (testWorld != lastTestWorld || prefabSet != lastPrefabSet)
                {
                    lastTestWorld = testWorld;
                    lastPrefabSet = prefabSet;

                    var prefab = WorldManager.I.GetPrefab(prefabSet, testWorld);

                    UpdatePrefab(prefab);
                }
            }
        }
Пример #2
0
        public GameObject GetPrefab(WorldPrefabSet prefabSet, WorldID world)
        {
            if (world == WorldID.Default)
            {
                if (prefabSet.defaultPrefab != null)
                {
                    return(prefabSet.defaultPrefab);
                }

                return(prefabSet.worldPrefabs[0]);
            }
            else
            {
                return(prefabSet.worldPrefabs[(int)world]);
            }
        }
Пример #3
0
 /// <summary>
 /// Get prefab for current world
 /// </summary>
 public GameObject GetPrefab(WorldPrefabSet prefabSet)
 {
     return(GetPrefab(prefabSet, CurrentWorld));
 }