1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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<DevicesTargetCreat>();
- 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);
-
- }
- }
- }
|