Class SerializePropertyAttribute
Use this attribute to enable properties to be shown like fields in the inspector.
WARNING: This does NOT serialize or save the property in any way.
Due to to the limition mentioned above the attributes are only editable in the play mode.
Any changes made to the properties in edit mode will not be saved.
[SerializeProperty]
public int PlayerHealth => m_PlayerHealth;
NOTE: It will still not be editable in edit mode.
[SerializeProperty]
public int PlayerHealth { get; set; }
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
public class SerializePropertyAttribute : Attribute
- Inheritance
-
SerializePropertyAttribute
Constructors
SerializePropertyAttribute()
public SerializePropertyAttribute()