当前位置:网站首页>[RequireComponent(typeof(....))]
[RequireComponent(typeof(....))]
2022-07-26 22:07:00 【Unity tool man】
When a script must rely on other scripts or components for common use , In order to avoid the operation error of artificial adding process , You can use... In your code RequireComponent, Its function is to add the script , The dependent components will be automatically added to gameobject On , Avoid human error .
example :
[RequireComponent(typeof(Image))]
public class Person : MonoBehaviour
{
}
When loading the script for an object Image Components will be automatically added to the Inspector panel
边栏推荐
- Oppo self-developed large-scale knowledge map and its application in digital intelligence engineering
- Matlab draws short-term average amplitude spectrum
- Development to testing: a six-year road to automation from scratch
- VB.net Chart1的处理
- Go----Go语言中的变量使用方法
- Circular progress bar animation based on cashapelayer and Bezier curve
- Jd.com: how does redis realize inventory deduction? How to prevent goods from being oversold?
- day07-
- Schematic diagram of MOS tube
- LDAP -- realize unified login management of users
猜你喜欢
![[mysql]substr usage - query the value of specific digits of a field in the table](/img/d5/68658ff15f204dc97abfe7c9e6b354.png)
[mysql]substr usage - query the value of specific digits of a field in the table

Xshell7 personal free download, use

Technology sharing | do you know the functions of the server interface automated testing and requests library?

A bowl of noodles in a dream

Matlab draws short-term average amplitude spectrum

京东一面:Redis 如何实现库存扣减操作?如何防止商品被超卖?

Implementation of MATLAB short-time autocorrelation

Try new functions | decrypt Doris complex data type array

深入源码剖析String类为什么不可变?(还不明白就来打我)

09 expr 命令
随机推荐
Altium designer 22 Chinese character garbled
Thoroughly understand the principle and implementation of service discovery
win10下mysql改密码后,突然登录不上的问题解决过程记录
Leetcode exercise - Sword finger offer II 005. maximum product of word length
Knowledge base tools | wechat, document center, image display page can be generated by dragging (with template, directly used)
【Try to Hack】防火墙(一)
npm, npm中文文档, npm学习使用
js验证复杂密码
伦敦银外汇走势理解与实操
Jd.com: how does redis realize inventory deduction? How to prevent goods from being oversold?
梦里的一碗面
Database notes (from Lao She)
Afnetworking understand
1 - "pytorch deep learning practice" - linear model
JS delay execution window.onload
七月集训(第26天) —— 并查集
正规方程法(Normal Equation)原理以及与梯度下降法的区别
仅需一个依赖给Swagger换上新皮肤,既简单又炫酷
JMeter custom log and log analysis
Is it safe to open an account on flush? How to choose a securities firm for opening an account