Check if a target UICanvas is the Master Canvas. An UICanvas is considered as the Master Canvas if its canvas name is set to ‘MasterCanvas’ and if it has been registered (an recognized) by the system as such.
public class ExampleClass : MonoBehaviour
public UICanvas MyCanvas;
private void Start()
bool isMasterCanvas = MyCanvas.IsMasterCanvas;
Debug.Log("The target UICanvas " + (isMasterCanvas ? "is" : "is not") + " the Master Canvas.");