Wiki > UniNotes

DividerAttribute class

Attribute class that can be used to sync the dictionary key with a field value. This will make the field value to be changed when the entry key is changed.

Namespace: RotaryHeart.Lib.UniNotes
Package: UniNotes


public class DividerAttribute : PropertyAttribute


Accessibility Level Name Description
public DividerAttribute Adds an empty divider, which will end up being a horizontal line only.
public DividerAttribute(string) Adds a divider with header only.
public DividerAttribute(string, string) Adds a divider with header and subtitle.


Accessibility Level Type Name Description
public string Header Returns the header assigned.
public string Subtitle Returns the subtitle assigned.


Here's a quick example of how to use the divider. On the following script the system will be drawing the 3 different dividers we have included. To be able to add a divider all you need to do is add the attribute on top of the field where you want the divider to be drawn.

[Divider("Characer Sheet", "Character data only"), SerializeField]
private int myInt;

[Divider("Camera Movement"), SerializeField]
private string myString;

[Divider, SerializeField]
private Transform m_target;

The output inspector for this code will be the following:


See also