Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

- Sample

Code Block
languagec#
using CavrnusSdk.API;
using UnityEngine.UI;
using UnityEngine;

public class LimitCreateSpaceByOrgRole : MonoBehaviour
{
    public Button CreatSpaceButton;

    void Start()
    {
        CavrnusFunctionLibrary.BindGlobalPolicy("canCreateSpaces", allowed => ButtonPermissionsChanged(allowed));
    }

    public void ButtonPermissionsChanged(bool allowed)
    {
        CreatSpaceButton.gameObject.SetActive(allowed);
    }
}//Coming soon!