An abstract class in Root.Township, Alta.Menu.
Base for one setting row in the in-game settings panel, showing a setting of type T. Client only. Hides itself if the setting isn't valid on this platform.
Constructors
| Member | What it is |
|---|
protected MenuGameSetting() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|
protected TextRenderer displayNameText | Text that shows the setting's display name. |
protected T settingToDisplay | The setting this row shows. Touching the row with a hand shows its description. |
1 private and internal field
Properties
Methods
| Member | What it is |
|---|
override void SetSettings(ISettingsFieldAccess newSettingToDisplay) | Points the row at another setting and sets it up again. |
protected virtual void OnValidate() | Editor hook for subclasses. Empty by default. |
protected virtual void Setup() | Fills the row from the setting. The base writes the display name. |
3 private and internal methods
| Member | What it is |
|---|
private void CheckSetup() | Hides the control if its setting is not valid on this build, otherwise calls Setup. |
private void OnTriggerEnter(Collider other) | When a player's hand touches the control, shows the setting's description on the settings panel. |
private void Start() | Calls CheckSetup. |