当前位置:网站首页>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";
}
}
边栏推荐
- Linear distance between two points of cesium
- rt-thread i2c 使用教程
- [cloud native and 5g] micro services support 5g core network
- 持续测试(CT)实战经验分享
- Example of applying fonts to flutter
- PowerPivot - DAX (first time)
- Transformer model (pytorch code explanation)
- 部门树递归实现
- 爬虫(14) - Scrapy-Redis分布式爬虫(1) | 详解
- RT thread I2C tutorial
猜你喜欢
Node.js: express + MySQL实现注册登录,身份认证
Jupyter launch didn't respond after Anaconda was installed & the web page was opened and ran without execution
Introduction of Xia Zhigang
Enumeration gets values based on parameters
rt-thread i2c 使用教程
Cesium Click to draw a circle (dynamically draw a circle)
语音识别(ASR)论文优选:全球最大的中英混合开源数据TALCS: An Open-Source Mandarin-English Code-Switching Corpus and a Speech
Standardized QCI characteristics
HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
腾讯安卓开发面试,android开发的基础知识
随机推荐
AsyncHandler
golang的超时处理使用技巧
Introduction of Xia Zhigang
BUUCTF---Reverse---easyre
The "white paper on the panorama of the digital economy" has been released with great emphasis on the digitalization of insurance
Selenium advanced operations
Information System Project Manager - Chapter VIII project quality management
JVM_ Common [interview questions]
JS get browser system language
Logstash expressway entrance
Cesium 点击绘制圆形(动态绘制圆形)
范式的数据库具体解释
Standardized QCI characteristics
【GET-4】
Monthly report of speech synthesis (TTS) and speech recognition (ASR) papers in June 2022
Period compression filter
String长度限制?
8086指令码汇总表(表格)
Database specific interpretation of paradigm
【Yann LeCun点赞B站UP主使用Minecraft制作的红石神经网络】