UnityEngine.UI系统基础类架构图
2017-04-18 17:41:14 0 举报
UnityEngine.UI系统基础类架构图主要包括以下几个部分:Canvas、Panel、Image、Text、Button、InputField等。其中,Canvas是UI元素的容器,可以包含多个Panel;Panel是UI布局的基类,可以用于组织和管理其他UI元素;Image用于显示图像;Text用于显示文本;Button用于创建交互按钮;InputField用于创建输入框。这些类之间存在父子关系和继承关系,通过调用各自的方法可以实现各种复杂的UI效果。
作者其他创作
大纲/内容
Image
+ overridesprite : Sprite+ sprite : Sprite+ fillAmount : float
Selectable
+ interactable : bool+ targetGraphic : Graphic
+ OnSelect(BaseEventData)+ Select()+ OnPointerXXX(BaseEventData)
VerticalLayout
Button
+ onClick : delegate
HorizontalLayout
UIBehaviour
1. print 静态函数2. IsActive3. IsDestory4. protcted OnCanvasGroupChanged5. OnRectTransformDimensionsChange
MaskableGraphic
+ maskable : bool+ material
+ ParentMaskStateChanged
LayoutGroup
+ childAlignment:TextAnchor+ padding : RectOffSet
+ operation1(params):returnType- operation2(params)- operation3()
ToggleGroup
+ allowSwitchOff
+ NotifyToggleOn(Toggle)+ ActiveToggles()- Un/RegisterToggle(Toggle)
RawImage
+ texture : Texture+ uvRect : Rect
HorizontalOrVerticalLayoutGroup
+ childForceExpandHeight+ childForceExpandHeight+ spacing
Graphic
+ mainTexture+ color+ canvas+ canvasRenderer+ material+ rectTransform
InputField
+ onEndEdit : delegate+ onValidateInput : delegate+ on ValueChanged : delegate+ text : string+ placeHolder : Graphic
Mask
+ rectTransform+ showMaskGraphic : bool
LayoutElement
+ ignoreLayout : bool+ minWidth/Height+ preferredWidth/Height+ flexibleWidth/Height
Created By 王选易微博: http://weibo.com/wangxuanyihaha
GridLayout
+ cellSize : Vector2+ startAxis+ startCorner+ spacing
Text
+ text : string
ScrollRect
+ content : RectTransform+ horizontalNormalizedPosition : float+ verticalNormalizedPosition : float+ onValueChanged : delegate
+ OnScroll
Toggle
+ onValueChanged(bool)
MonoBehaviour
0 条评论
下一页