当前位置:网站首页>Uibehavior, a comprehensive exploration of ugui source code
Uibehavior, a comprehensive exploration of ugui source code
2022-07-06 07:50:00 【Walking on the top of the clouds】
UIBehaviour For all UI The base class of the component , Inherited from MonoBehavior, Have Unity The same life cycle .
UI Components are inherited directly or indirectly UIBehaviour This abstract class .
except Awake,OnEnable,Start,OnDisable,OnDestroy Outside , Contains some and ui Change related virtual methods
// When related RectTransform Call when the dimension changes
protected virtual void OnRectTransformDimensionsChange()
{}
// Call before changing the parent
protected virtual void OnBeforeTransformParentChanged()
{}
// When the parent is changed, call
protected virtual void OnTransformParentChanged()
{}
// Called when animation properties are applied
protected virtual void OnDidApplyAnimationProperties()
{}
// When the canvas group is changed, call
protected virtual void OnCanvasGroupChanged()
{}
// Call when the canvas state changes
protected virtual void OnCanvasHierarchyChanged()
{}
//
public bool IsDestroyed()
{
return this == null;
}
The parent class description of each component :
Text-->MaskableGraphic-->Graphic-->UIBehaviour
Image-->MaskableGraphic-->Graphic-->UIBehaviour
RawImage-->MaskableGraphic-->Graphic-->UIBehaviour
Button-->Selectable-->UIBehaviour
Toggle-->Selectable-->UIBehaviour
Slider-->Selectable-->UIBehaviour
ScrollBar-->Selectable-->UIBehaviour
DropDown-->Selectable-->UIBehaviour
InputFiled-->Selectable-->UIBehaviour
EventSystem-->UIBehaviour
special
ScrollView It's made up of several components , The key ScrollRect-->UIBehaviour
Panel Yes, built-in ui picture Background Of Image
边栏推荐
猜你喜欢
leecode-C語言實現-15. 三數之和------思路待改進版
Inspiration from the recruitment of bioinformatics analysts in the Department of laboratory medicine, Zhujiang Hospital, Southern Medical University
Simulation of holographic interferogram and phase reconstruction of Fourier transform based on MATLAB
leecode-C语言实现-15. 三数之和------思路待改进版
TS 类型体操 之 循环中的键值判断,as 关键字使用
. Net 6 learning notes: what is NET Core
24. Query table data (basic)
21. Delete data
In the era of digital economy, how to ensure security?
opencv学习笔记八--答题卡识别
随机推荐
软件开发的一点随记
[computer skills]
解决方案:智慧工地智能巡檢方案視頻監控系統
Generator Foundation
Interview Reply of Zhuhai Jinshan
edge瀏覽器 路徑獲得
Description of octomap averagenodecolor function
珠海金山面试复盘
[cf gym101196-i] waif until dark network maximum flow
WebRTC系列-H.264预估码率计算
Data governance: 3 characteristics, 4 transcendence and 3 28 principles of master data
超级浏览器是指纹浏览器吗?怎样选择一款好的超级浏览器?
Inspiration from the recruitment of bioinformatics analysts in the Department of laboratory medicine, Zhujiang Hospital, Southern Medical University
49. Sound card driven article collection
Ble of Jerry [chapter]
C # display the list control, select the file to obtain the file path and filter the file extension, and RichTextBox displays the data
Do you really think binary search is easy
Opencv learning notes 8 -- answer sheet recognition
链表面试题(图文详解)
Typescript interface and the use of generics