-
Notifications
You must be signed in to change notification settings - Fork 1
autoAlpha
Jan-Ole Schümann edited this page Jun 3, 2017
·
3 revisions
Tweens the alpha value of a GameObject, Transform or RectTransform, and sets SetActive() to false if the alpha value is 0, otherwise to true. The value should be between 0 and 1.
The example below shows how to fade out an object from its current alpha value to 0. When alpha reaches 0, SetActive(false) is automatically called on the target GameObject.
TweenSharp tween = new TweenSharp(gameObject, 5f,
{
autoAlpha = 0f,
ease = Quad.EaseOut
});