UICanvas

class in Doozy.Engine.UI / Inherits from UIComponentBase

Description

The UICanvas class is a core component in the DoozyUI system. It is used to identify GameObjects with root Canvas components attached to instantiate UIPopups, at runtime, and to parent other UI components under them, in the Editor.
See Also: Canvas

Static Properties

  • public static string DefaultCanvasCategory – Default UICanvas canvas category name

  • public static string DefaultCanvasName – Default UICanvas canvas name

  • public static UICanvas MasterCanvas – Returns a reference to the UICanvas named ‘MasterCanvas’. There can be only one!

  • public static string MasterCanvasName – Default UICanvas canvas name for the MasterCanvas

Properties

  •  public Canvas Canvas – Reference to the Canvas component

  • public bool IsMasterCanvas – Returns true it this UICanvas has the name ‘MasterCanvas’ and if it has been registered as the MasterCanvas

Public Variables

  • public string CanvasName – UICanvas canvas name

  • public bool CustomCanvasName – [Editor Only] Internal variable used by the custom inspector to allow you to type a custom canvas name instead of selecting it from the database

  • public bool DontDestroyCanvasOnLoad – Makes the GameObject, that this UICanvas component is attached to, not to get destroyed on load (when the scene changes)

Static Methods

  • public static UICanvas CreateUICanvas(string canvasName) – Creates a new UICanvas with the given canvasName and return a reference to it

  • public static bool DatabaseContains(string canvasName) – Returns true if the UICanvas Database contains an UICanvas with the given canvasName

  • public static UICanvas GetMasterCanvas(bool createMasterCanvasIfNotFound = true) – Returns a reference to the UICanvas that is considered and used as the ‘MasterCanvas’. If no such UICanvas exists, one will be automatically created by default

  • public static UICanvas GetUICanvas(string canvasName) – Returns an UICanvas that has been registered in the UICanvas Database, that has the given canvasName. If no UICanvas is found, it will return null

  • public static UICanvas GetUICanvas(string canvasName, bool createUICanvasIfNotFound, bool returnMasterCanvasIfUICanvasNotFound = true) – Returns an UICanvas that has been registered in the UICanvas Database, that has the given canvasName. If no UICanvas is found, it will either create a new UICanvas with the given canvasName or it will return the MasterCanvas