using System.Collections;
using System.Collections.Generic;
using UnityEditor;//命名空间
using UnityEngine;
using UnityEngine.UI;
//继承Editor
public class TextEdiot : Editor {
[MenuItem("ChaJian/WangNeng")]
//写一个静态方法
public static void Get()
{
// GameObject cube = Resources.Load<GameObject>("UI/Cube");
// GameObject go = Instantiate(cube);
// go.name = "Cube";
// Debug.Log("插件制作成功");
Transform canvas1 = Resources.Load<Transform>("UI/Canvas");
Transform kl = Instantiate(canvas1);
kl.name = "Canvas";
Image image = Resources.Load<Image>("UI/Image");
Image m = Instantiate(image);
//Transform canvas = GameObject.Find("Canvas").transform;
m.transform.SetParent(kl, false);
m.name = "Image";
Transform EventSystem1 = Resources.Load<Transform>("UI/EventSystem");
Transform ev = Instantiate(EventSystem1);
ev.name = "EventSystem";
}
}