当前位置:网站首页>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";
}
}
边栏推荐
- Information System Project Manager - Chapter VIII project quality management
- 使用ssh连接被拒
- 部门树递归实现
- Cesium 两点之间的直线距离
- PowerPivot——DAX(初识)
- 持续测试(CT)实战经验分享
- The "white paper on the panorama of the digital economy" has been released with great emphasis on the digitalization of insurance
- PowerPivot - DAX (first time)
- Qinglong panel white screen one key repair
- Finally, there is no need to change a line of code! Shardingsphere native driver comes out
猜你喜欢
OceanBase社区版之OBD方式部署方式单机安装
Classic 100 questions of algorithm interview, the latest career planning of Android programmers
深度学习分类网络 -- ZFNet
系统与应用监控的思路和方法
Ideas and methods of system and application monitoring
Tencent architects first, 2022 Android interview written examination summary
新一代垃圾回收器—ZGC
爬虫(14) - Scrapy-Redis分布式爬虫(1) | 详解
夏志刚介绍
BUUCTF---Reverse---easyre
随机推荐
Initial experience of addresssanitizer Technology
Leetcode brush first_ Maximum Subarray
8086 instruction code summary (table)
AsyncHandler
精彩编码 【进制转换】
Cesium 两点之间的直线距离
It's enough to read this article to analyze the principle in depth
Poj1149 pigs [maximum flow]
redisson bug分析
爬虫(14) - Scrapy-Redis分布式爬虫(1) | 详解
学习打卡web
js获取浏览器系统语言
SSH connection denied
[network planning] Chapter 3 data link layer (3) channel division medium access control
枚举根据参数获取值
Technology sharing | packet capturing analysis TCP protocol
Node.js: express + MySQL实现注册登录,身份认证
Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
String长度限制?
mod_wsgi + pymssql通路SQL Server座