private static void raw() { MenuWorkshopSpawnsUI.rawField.isVisible = true; MenuWorkshopSpawnsUI.rootsBox.isVisible = false; MenuWorkshopSpawnsUI.tablesBox.isVisible = false; MenuWorkshopSpawnsUI.addRootIDField.isVisible = false; MenuWorkshopSpawnsUI.addRootSpawnButton.isVisible = false; MenuWorkshopSpawnsUI.addTableIDField.isVisible = false; MenuWorkshopSpawnsUI.addTableAssetButton.isVisible = false; MenuWorkshopSpawnsUI.addTableSpawnButton.isVisible = false; MenuWorkshopSpawnsUI.applyWeightsButton.isVisible = false; MenuWorkshopSpawnsUI.asset = (SpawnAsset)Assets.find(EAssetType.SPAWN, MenuWorkshopSpawnsUI.viewIDField.state); string text; if (MenuWorkshopSpawnsUI.asset != null) { text = MenuWorkshopSpawnsUI.getRaw(MenuWorkshopSpawnsUI.asset); } else { text = "?"; } MenuWorkshopSpawnsUI.rawField.text = text; GUIUtility.systemCopyBuffer = text; MenuWorkshopSpawnsUI.spawnsBox.area = new Rect(0f, 0f, 5f, 1080f); }
private static void write() { MenuWorkshopSpawnsUI.asset = (SpawnAsset)Assets.find(EAssetType.SPAWN, MenuWorkshopSpawnsUI.viewIDField.state); if (MenuWorkshopSpawnsUI.asset == null) { return; } if (string.IsNullOrEmpty(MenuWorkshopSpawnsUI.asset.absoluteOriginFilePath) || !File.Exists(MenuWorkshopSpawnsUI.asset.absoluteOriginFilePath)) { return; } string raw = MenuWorkshopSpawnsUI.getRaw(MenuWorkshopSpawnsUI.asset); File.WriteAllText(MenuWorkshopSpawnsUI.asset.absoluteOriginFilePath, raw); }