private void Save() { if (!_areaBuilder.IsValid()) { return; } var newArea = Instantiate(worldAreaPrefab, _world.transform); var worldArea = newArea.GetComponent <WorldArea>(); _areaBuilder.Build(worldArea); _modeControl.ChangeSelectionMode(SelectionMode.Area); _areaBuilder = null; _selectionDisplayControl.UpdateSelection(worldArea.tiles[0]); gameObject.SetActive(false); }
// Builds the extra UI content for debugging public static void Build() { // Build the Debug Handler GameObject info = TargetingUI.Instance.infoText.gameObject; GameObject debug = Instantiate(info, info.transform.parent); debug.name = "Debug"; debug.AddComponent <DebugHandler>(); DebugText = debug.GetComponent <TMP_Text>(); DebugText.richText = true; DebugText.text = string.Empty; // Build all required debug things AreaBuilder.Build(); // Setup things Setup(); }