Class SettingsTreeview
Class that can be used to make a settings tree view
Namespace: Unity.RemoteConfig.Editor.UIComponents
Syntax
public class SettingsTreeview
Constructors
SettingsTreeview(String, String, String)
Constructor for the component.
Declaration
public SettingsTreeview(string addSettingButtonText = "Add Setting", string keyColumnHeader = "Key", string valueColumnHeader = "Value")
Parameters
Type | Name | Description |
---|---|---|
String | addSettingButtonText | Text to populate in the footer button that adds a setting. Defaults to "Add Setting". |
String | keyColumnHeader | Text to populate in the header for the key column. Defaults to "Key". |
String | valueColumnHeader | Text to populate in the header for the value column. Defaults to "Value". |
Properties
activeSettingsList
JArray of "active settings" - those being used in rules.
Declaration
public JArray activeSettingsList { set; }
Property Value
Type | Description |
---|---|
JArray |
enableEditingSettingsKeys
Sets whether or not the keys can be updated
Declaration
public bool enableEditingSettingsKeys { set; }
Property Value
Type | Description |
---|---|
Boolean |
isLoading
Sets the loading state of the tree view.
Declaration
public bool isLoading { set; }
Property Value
Type | Description |
---|---|
Boolean |
rulesList
JArray of rules - used to determine if the setting can be modified or not.
Declaration
public JArray rulesList { set; }
Property Value
Type | Description |
---|---|
JArray |
settingsList
JArray of settings.
Declaration
public JArray settingsList { set; }
Property Value
Type | Description |
---|---|
JArray |
Methods
OnGUI(Rect)
Renders the treeview and footer
Declaration
public void OnGUI(Rect viewRect)
Parameters
Type | Name | Description |
---|---|---|
Rect | viewRect | The Rect inside which to draw the tree view and footer |
Events
OnSettingChanged
Event fired by this component whenever a setting has been changed. The first JObject represents the setting before the change was made. The second JObject represents the setting after the change has been made. If the old setting is null, the setting is new. If the new setting is null, but the old setting is not, this is removing a setting.
Declaration
public event Action<JObject, JObject> OnSettingChanged
Event Type
Type | Description |
---|---|
Action<JObject, JObject> |