当前位置:网站首页>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";
}
}
边栏推荐
- AddressSanitizer 技术初体验
- Initial experience of addresssanitizer Technology
- Tencent architects first, 2022 Android interview written examination summary
- 枚举根据参数获取值
- Tencent byte Alibaba Xiaomi jd.com offer got a soft hand, and the teacher said it was great
- Web开发小妙招:巧用ThreadLocal规避层层传值
- Example of shutter text component
- redisson bug分析
- 02 基础入门-数据包拓展
- Groovy basic syntax collation
猜你喜欢
爬虫(14) - Scrapy-Redis分布式爬虫(1) | 详解
【GET-4】
An East SMS login resurrection installation and deployment tutorial
案例 ①|主机安全建设:3个层级,11大能力的最佳实践
枚举根据参数获取值
HMS Core 机器学习服务打造同传翻译新“声”态,AI让国际交流更顺畅
新一代垃圾回收器—ZGC
5. Wireless in vivo nano network: top ten "feasible?" problem
22-07-05 upload of qiniu cloud storage pictures and user avatars
Standardized QCI characteristics
随机推荐
HDU 1026 Ignatius and the Princess I 迷宫范围内的搜索剪枝问题
Period compression filter
Recursive implementation of department tree
Oceanbase Community Edition OBD mode deployment mode stand-alone installation
POJ 3207 Ikki&#39;s Story IV – Panda&#39;s Trick (2-SAT)
广州首个数据安全峰会将在白云区开幕
精彩编码 【进制转换】
Color is converted to tristimulus value (r/g/b) (dry stock)
HMS Core 机器学习服务打造同传翻译新“声”态,AI让国际交流更顺畅
POJ1149 PIGS 【最大流量】
Jupyter launch didn't respond after Anaconda was installed & the web page was opened and ran without execution
Classic 100 questions of algorithm interview, the latest career planning of Android programmers
Continuous test (CT) practical experience sharing
Appx code signing Guide
【计网】第三章 数据链路层(4)局域网、以太网、无线局域网、VLAN
Logstash expressway entrance
AsyncHandler
腾讯T4架构师,android面试基础
Poj1149 pigs [maximum flow]
夏志刚介绍