void OnPlatformChange() { if (buildPlatform == BuildPlatform.IOS && xcodeSetting == null) { AppInfoConfig appInfoConfig = AssetDatabasex.LoadAssetOfType <AppInfoConfig>("AppInfoConfig"); xcodeSetting = new AFXcodeSetting(AssetDatabase.GetAssetPath(appInfoConfig)); TextAsset textAsset = AssetDatabasex.LoadAssetOfType <TextAsset>("XcodeSetting"); if (textAsset != null) { xcodeSetting.InitWithExit(SerializeHelper.FromJson <XcodeSetting>(textAsset.text)); } } }
protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(); this.titleContent = new GUIContent("AFramework设置"); tree.Config.DrawSearchToolbar = true; tree.DefaultMenuStyle.Height = 30; tree.Selection.SupportsMultiSelect = false; AppInfoConfig appInfoConfig = AssetDatabasex.LoadAssetOfType <AppInfoConfig>("AppInfoConfig"); ABAndPathConfig aBAndPathConfig = new ABAndPathConfig(); AFXcodeSetting aFXcodeSetting = new AFXcodeSetting(AssetDatabase.GetAssetPath(appInfoConfig)); TextAsset textAsset = AssetDatabasex.LoadAssetOfType <TextAsset>("XcodeSetting"); if (textAsset != null) { aFXcodeSetting.InitWithExit(SerializeHelper.FromJson <XcodeSetting>(textAsset.text)); } APPBuildWindows buildAppWindows = AssetDatabasex.LoadAssetOfType <APPBuildWindows>("APPBuildWindows"); buildAppWindows.xcodeSetting = aFXcodeSetting; buildAppWindows.SyncSceneWithBuildSetting(); tree.Add("App基本信息配置", appInfoConfig); tree.Add("AB打包配置", aBAndPathConfig); tree.Add("APP打包配置", buildAppWindows); tree.Add("AR SDK配置", new ARSDKConfig()); tree.Add("Unity配置", AssetDatabasex.LoadAssetOfType <AFUnitySettingWindows>("AFUnitySetting")); tree.Add("UI配置", AssetDatabasex.LoadAssetOfType <AFUIConfig>("AFUIConfig")); tree.Add("多语言配置", AssetDatabasex.LoadAssetOfType <LanuageInfo>("LanuageInfo")); tree.Add("查找重复文件", new SearchDuplicateFiles()); tree.Add("批量更改Raycast Target选项", new ChangeRaycastTarget()); tree.Add("批量更换字体", new ChangeFont()); tree.Selection.SupportsMultiSelect = false; List <OdinMenuItem> menuItems = tree.MenuItems; OdinMenuTreeSelection odinMenuItems = tree.Selection; odinMenuItems.Add(menuItems[selectIndex]); return(tree); }