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);
                }
            }
        }
Exemple #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]);
            }
        }
Exemple #3
0
 /// <summary>
 /// Get prefab for current world
 /// </summary>
 public GameObject GetPrefab(WorldPrefabSet prefabSet)
 {
     return(GetPrefab(prefabSet, CurrentWorld));
 }