A class in Root.Township, Alta.Meta.UI.ServerManagement.
Main menu UI helper that shows or hides objects depending on whether you hold the given permissions in the group a SelectedGroupPanel is showing. Client only.
Constructors
| Member | What it is |
|---|
GroupPermissionsEnabler() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private SelectedGroupPanel groupPanel | The selected group panel whose group is checked. |
private ToggleUnityEvent hasPermissionsEvent | Event invoked with true or false after each check. |
private GroupPermissions[] permissions | The group permissions you must hold for the objects to be shown. |
private GameObject[] toEnableWithPermissions | Objects made active only when you hold the permissions. |
Methods
2 private and internal methods
| Member | What it is |
|---|
private void HandleGroupChange(SelectedGroupPanel obj) | Checks your roles in the panel's group against permissions, toggles the objects and fires hasPermissionsEvent. |
private void Start() | Subscribes to the panel's GroupUpdated event and runs the check at once if a group is already set. |