Click or drag to resize

CanvasTween Class

A component for animating the alpha of a CanvasGroup, useful for UI fading
Inheritance Hierarchy
SystemObject
  UnityEngine.Object
    UnityEngine.Component
      UnityEngine.Behaviour
        UnityEngine.MonoBehaviour
          ImmerseSDKCanvasTween

Namespace:  ImmerseSDK
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.9.0.0 (3.9.0.0)
Syntax
C#
[HelpURLAttribute("https://immerse.readme.io/")]
[UnityEngine.RequireComponent(typeof(UnityEngine.CanvasGroup))]
public sealed class CanvasTween : UnityEngine.MonoBehaviour

The CanvasTween type exposes the following members.

Constructors
  NameDescription
Public methodCanvasTween
Initializes a new instance of the CanvasTween class
Top
Properties
  NameDescription
Public propertyIsVisible
Returns true if the alpha value of the CanvasGroup is greater than 0
Top
Methods
  NameDescription
Public methodGetAlpha
Get the current alpha value of the attached CanvasGroup
Public methodHide
Hide canvas, use TransitionTime setting
Public methodHide(Single)
Hide canvas, override TransitionTime setting
Public methodSetAlpha
Stop any current transition and set to a CanvasGroup alpha to a specific value
Public methodShow
Show canvas, use TransitionTime setting
Public methodShow(Single)
Show canvas, override TransitionTime setting
Public methodStopTransition
Stop any current transition
Top
Events
  NameDescription
Public eventOnVisibilityChanged
Fired when the canvas becomes visible in invisible
Top
Fields
  NameDescription
Public fieldToggleGameObject
Should the GameObject be disabled when reaching 0 alpha (an re-enabled when showing)
Public fieldTransitionTime
The amount of time it takes to fade in/out
Top
Extension Methods
  NameDescription
Public Extension MethodGetCopyOf
Copies all properties of a component from source to target. Uses reflection to set properties.
(Defined by ComponentExtensions.)
Public Extension MethodWaitForT
Waits for a singleton on a coroutine
(Defined by SingletonManager.)
Top
See Also