In this second part we will review all RenderProperty attributes available on WaveEngine 2.0. But if you did not see the first article then we recommend you read it before this one.
It’s important to follow this rules when you want to create a custom component:
- You must create a custom component as an extended class of Component, Behavior or Drawable.
- Add [DataContract] attribute to custom component class.
- Custom component must take parameterless public constructor.
- All public properties in the custom component will show on Wave Visual Editor from Entity Details panel.
- Add [DataMember] attribute to all public properties if you want its values stored during serialization process.
- Basic data types are automatically displayed by Wave Visual Editor (bool, int, float, Vector2, Vector3, Quaternion…), however unknown data types are shown as a string.
- You can add RenderProperty attributes to public properties in order to change how it is shown on Wave Visual Editor.
- Default properties values must be set on a DefaultValues method.