12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- namespace AtlasUtility
- {
- using LitJson;
- using System.IO;
- using System.Linq;
- using System.Collections.Generic;
- using UnityEditor;
- using UnityEngine;
- using UnityEngine.UI;
- using UnityEditor.iOS.Xcode;
- [CustomEditor(typeof(Test))]
- public class TestEditor : Editor
- {
- #region Variable
- public Test Script;
- #endregion
- public void OnEnable()
- {
- Script = (Test) target;
- }
- public override void OnInspectorGUI()
- {
- base.OnInspectorGUI();
- if (GUILayout.Button("Test"))
- {
- string plistPath = "C:/Users/Administrator/Desktop/IOS/Info.plist";
- PlistDocument plist = new PlistDocument();
- plist.ReadFromFile(plistPath);
- string projectPath = PBXProject.GetPBXProjectPath("C:/Users/Administrator/Desktop/IOS/");
- PBXProject project = new PBXProject();
- project.ReadFromFile(projectPath);
-
- //PlistElementDict urlDict = plist.root["CFBundleURLTypes"].AsArray().AddDict();
- //urlDict.SetString("CFBundleURLSchemes", "MyLovelyGarden");
- //foreach (var array in plist.root["CFBundleURLTypes"].AsArray().values)
- //{
- // Debug.Log("URLType");
- // foreach (var dic in array.AsDict().values)
- // {
- // if (dic.Value.GetType() == typeof(PlistElementString))
- // {
- // Debug.Log(" " + dic.Key + " " + dic.Value.AsString());
- // }
- // else if (dic.Value.GetType() == typeof(PlistElementArray))
- // {
- // Debug.Log(" URLSchemes");
- // foreach (var ele in dic.Value.AsArray().values)
- // {
- // Debug.Log(" " + ele.AsString());
- // }
- // }
- // }
- //}
- }
- }
- }
- }
|