public static void start_unit_editor(string chapterId, string mapDataKey, string unitDataKey) { UnitEditorActive = true; Global.game_temp = new Game_Temp(); Global.game_battalions = new Game_Battalions(); Global.game_actors = new Game_Actors(); Global.change_to_new_scene("Scene_Map_Unit_Editor"); Global.game_system.reset(); Global.game_system.new_chapter(new List <string>(), Global.game_system.chapter_id, new Dictionary <string, string>()); Global.reset_game_state(); var old_map = Global.game_map; Global.game_map = new Game_Map(); Global.player = new Player(); // Trying to start this after everything else, instead of in the middle //move_range_update_thread(); //Debug Global.clear_events(); //Global.Audio.clear_map_theme(); //@Debug Global.set_unit_editor_data(chapterId, mapDataKey, unitDataKey); Global.change_game_state_turn(); if (old_map != null) { Global.game_map.set_scroll_loc(old_map.display_loc, true, true); Global.player.center_cursor(true); } }