Dynamic Header Scripting Dark Center Band Scripting
Learn / Documentation / Script Reference / UIComponentBase


class in Doozy.Engine.UI.Base / Inherits from: MonoBehaviour


The UIComponentBase is the base class for most of the important UI Components implemented in DoozyUI.

Static Properties

  • public static List Database – Database used to keep track of all the components of the given type. T is the component type that implements it

  • public static bool UIInteractionsDisabled – Returns TRUE if the UI interactions are disabled


Public Variables

  • public bool DebugMode – Enables relevant debug messages to be printed to the console

  • public Vector3 StartPosition – Holds the start RectTransform.anchoredPosition3D

  • public Vector3 StartRotation – Holds the start RectTransform.localEulerAngles

  • public Vector3 StartScale – Holds the start RectTransform.localScale

  • public float?StartAlpha – Holds the start alpha. It does that by checking if a CanvasGroup component is attached (holding the alpha value) or it just remembers 1 (as in 100% visibility)

Public Methods

  • public virtual void ResetToStartValues() – Resets the RectTransform values to the Start values (StartPosition, StartRotation, StartScale and StartAlpha)

  • public virtual void ResetPosition() – Resets the RectTransform.anchoredPosition3D to the StartPosition value

  • public virtual void ResetRotation() – Resets the RectTransform.localEulerAngles to the StartRotation value

  • public virtual void ResetScale() – Resets the RectTransform.localScale to the StartScale value

  • public virtual void ResetAlpha() – Resets the CanvasGroup.alpha to the StartAlpha value (if a CanvasGroup is attached)

  • public virtual void UpdateStartValues() – Updates the StartPosition, StartRotation, StartScale and StartAlpha for this RectTransform to the current values

  • public virtual void UpdateStartPosition() – Updates the StartPosition to the RectTransform.anchoredPosition3D value

  • public virtual void UpdateStartRotation() – Updates the StartRotation to the RectTransform.localEulerAngles value

  • public virtual void UpdateStartScale() – Updates the StartScale to the RectTransform.localScale value

  • public virtual void UpdateStartAlpha() – Updates the StartAlpha to the CanvasGroup.alpha value (if a CanvasGroup is attached)

Static Methods

  • public static void EnableUIInteractions() – Enables the UI interactions

  • public static void EnableUIInteractionsByForce() – Enables the UI interactions by resetting the additive bool to zero. s_uiInteractionsDisableLevel = 0. Use this ONLY for special cases when something wrong happens and the UI interactions are stuck in disabled mode

  • public static void DisableUIInteractions() – Disables the UI interactions