当前位置:网站首页>Unity technical notes (I) inspector extension

Unity technical notes (I) inspector extension

2022-07-07 22:31:00 Dimensional survivor

1 Show private variables , Hide public variables

[SerializeField] Add to private Private variables can be displayed before

[NonSerialized] Add to public Common variables can be hidden before , Make it not serialized

[HideInInspector] Add to public Common variables can be hidden before

2 Add a note

[Header(" ")] Add a title

[ToolTip(" ")] Add a mouse over prompt comment to the next line

3 Serialization display of special variables , Such as class 、 Linked list 、 Structure 、 enumeration

[System.Serializable] You can serialize the class and display

4 Special function , Such as buttons, etc

[Range(,)] Add a slider , Used to adjust the value of the variable

[TextArea(,)] Show multiline text box , Easy to edit string Variable

原网站

版权声明
本文为[Dimensional survivor]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130604579916.html