private void Awake() { InitializeObjectDictionary(); InitializePrefabDictionary(); mapDatabase.InitDictionary(); currentMap = mapDatabase.mapDatabaseObjects[0]; currentMap.InitDictionary(); }
private void Initialize() { initSuccessful = true; database = (GameDatabase)AssetDatabase.LoadAssetAtPath("Assets/Prefabs/GameDataObjects/GameDatabase.asset", typeof(GameDatabase)); mapDatabase = (MapDatabase)AssetDatabase.LoadAssetAtPath("Assets/Prefabs/MapDataObjects/MapDatabase.asset", typeof(MapDatabase)); if (database == null) { initSuccessful = false; Debug.Log("Cannot find GameDatabase"); } if (mapDatabase == null) { initSuccessful = false; Debug.Log("Cannot find MapDatabase"); } else { mapDatabase.InitDictionary(); } InitTextures(); SceneView.onSceneGUIDelegate += OnSceneGUI; var terrain = GameObject.Find("TerrainMap"); if (terrain) { tilemapParent = terrain.transform; } var map = GameObject.Find("SpawnMap"); if (map != null) { spawnMap = map.transform.Find("Spawn").GetComponent <Tilemap>(); } else { initSuccessful = false; Debug.Log("Cannot find SpawnMap"); } selectedCountry = null; selectedCreateType = MapDataType.None; Tools.current = Tool.None; Tools.hidden = true; }
private void RefreshDatabase() { PruneDatabase(); mapDatabase.InitDictionary(); InitTextures(); }