当前位置:网站首页>Unity making plug-ins
Unity making plug-ins
2022-07-06 20:13:00 【LiPing122335】
using System.Collections;
using System.Collections.Generic;
using UnityEditor;// Namespace
using UnityEngine;
using UnityEngine.UI;
// Inherit Editor
public class TextEdiot : Editor {
[MenuItem("ChaJian/WangNeng")]
// Write a static method
public static void Get()
{
// GameObject cube = Resources.Load<GameObject>("UI/Cube");
// GameObject go = Instantiate(cube);
// go.name = "Cube";
// Debug.Log(" Plug in made successfully ");
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";
}
}
边栏推荐
猜你喜欢
[calculating emotion and thought] floor sweeper, typist, information panic and Oppenheimer
A5000 vGPU显示模式切换
Digital triangle model acwing 1018 Minimum toll
数字三角形模型 AcWing 1018. 最低通行费
Vscode debug run fluent message: there is no extension for debugging yaml. Should we find yaml extensions in the market?
Continuous test (CT) practical experience sharing
永磁同步电机转子位置估算专题 —— 基波模型与转子位置角
01 基础入门-概念名词
Node.js: express + MySQL实现注册登录,身份认证
PowerPivot - DAX (first time)
随机推荐
JVM_ Common [interview questions]
Alibaba data source Druid visual monitoring configuration
Transformer model (pytorch code explanation)
Poj1149 pigs [maximum flow]
某东短信登录复活 安装部署教程
Leetcode brush first_ Maximum Subarray
【GET-4】
腾讯字节阿里小米京东大厂Offer拿到手软,老师讲的真棒
What happened to the kernel after malloc() was transferred? Attached malloc () and free () implementation source
PHP and excel phpexcel
Example of shutter text component
Introduction to enterprise lean management system
腾讯T4架构师,android面试基础
Anaconda安装后Jupyter launch 没反应&网页打开运行没执行
Standardized QCI characteristics
腾讯T3手把手教你,真的太香了
HMS Core 机器学习服务打造同传翻译新“声”态,AI让国际交流更顺畅
02 基础入门-数据包拓展
Tencent Android development interview, basic knowledge of Android Development
rt-thread i2c 使用教程