-
Notifications
You must be signed in to change notification settings - Fork 0
Property Overview
A Property is a component wich allow to add properties in GameObjects.
Property components are composed of 2 elements :
- A TagID (used to refer a Tag)
- A PropertyValue (where all the Property settings are stored)
The TypedValue is stored in the PropertyValue and will be define by the Type set in the Tag.
In the above example, the Type is set to Boolean in the Tag named "T-Boolean". So the TypedValue is a checkbox.
As Vector fields, Property components can have several values. By default they can have 3 values maximum :
- Property => one value (A)
- Property2 => two values (A, B)
- Property3 => three values (A, B, C)
Property, Property2 and Property3 are differents components.
Property2 and Property3 exist because it can be usefull sometime to have distinct values for the same Property. For example, if you take the Health characteristic for your player. With Property2, you can set the current Health (A) and the max Heatlh (B). With Property3, you can set the min Health (A), the current Health (B) and the max Health (C).
If you need more values for your Property, you can make your own Property component. See Property inheritance.
In editor mode, you will setting the Property's value.
At runtime, the value will be updated by your custom tagged components.
A Property is a component. So you can add it as any other component.
Select a GameObject in the scene view and click on "Add component" button in the inspector view :
Home
First look
What about performance ?
Tag
Tag overview
Export Tags
Import Tags
Property
Property overview
Setting a Property
Property Updater
Property inheritance
Find Property by script
Editor GUI
EditorGUI_PropertyInterface
EditorGUILayout_PropertyInterfac
MonoBehaviourTagged
Tagged component overview
Built in tagged component
Create my tagged component
Find MonoBehaviourTagged by script
Error
Null propagating operator
Scripting
Classes descriptions