using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using UnityEngine; using UnityEditor; using Object = UnityEngine.Object; public class DevicesTargetCreat : EditorWindow { public Transform creatContent; public Object jsonFile; public Vector3 creatPos; [MenuItem("Plugins/DevicesTargetCreat")] static void Init() { DevicesTargetCreat DevicesTargetCreatTool = EditorWindow.CreateWindow(); DevicesTargetCreatTool.Show(); } public void OnGUI() { creatPos=EditorGUILayout.Vector3Field("生成坐标", creatPos); jsonFile = Selection.activeObject; if (GUILayout.Button("生成参照物")) { if (jsonFile == null) { Debug.LogError("没选择Json!"); return; } int tempCount = 0; int abIndex = 0; string path = AssetDatabase.GetAssetPath(jsonFile); } } }