TestEditor.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. namespace AtlasUtility
  2. {
  3. using LitJson;
  4. using System.IO;
  5. using System.Linq;
  6. using System.Collections.Generic;
  7. using UnityEditor;
  8. using UnityEngine;
  9. using UnityEngine.UI;
  10. using ChillyRoom.UnityEditor.iOS.Xcode;
  11. [CustomEditor(typeof(Test))]
  12. public class TestEditor : Editor
  13. {
  14. #region Variable
  15. public Test Script;
  16. #endregion
  17. public void OnEnable()
  18. {
  19. Script = (Test) target;
  20. }
  21. public override void OnInspectorGUI()
  22. {
  23. base.OnInspectorGUI();
  24. if (GUILayout.Button("Test"))
  25. {
  26. string plistPath = "C:/Users/Administrator/Desktop/IOS/Info.plist";
  27. PlistDocument plist = new PlistDocument();
  28. plist.ReadFromFile(plistPath);
  29. string projectPath = PBXProject.GetPBXProjectPath("C:/Users/Administrator/Desktop/IOS/");
  30. PBXProject project = new PBXProject();
  31. project.ReadFromFile(projectPath);
  32. }
  33. }
  34. }
  35. }