Tanoda
UnityEngine.UI.Extensions.UI_TweenScale Class Reference

Dynamic scaling of text or image (including button) based on curves More...

Inheritance diagram for UnityEngine.UI.Extensions.UI_TweenScale:

Public Member Functions

void Play ()
 
void ResetTween ()
 

Public Attributes

AnimationCurve animCurve
 
float speed = 1
 
bool isLoop = false
 
bool playAtAwake = false
 
bool isUniform = true
 
AnimationCurve animCurveY
 

Detailed Description

Dynamic scaling of text or image (including button) based on curves

Fields

  • animCurve - animation curve for scale (if isUniform set to false, will apply only to X scale)
  • speed - animation speed
  • isLoop - animation will play infinitely (in order to make it work set your animation curve to loop)
  • playAtAwake - starts automatically with script becoming active. Otherwise you need to call Play() method.
  • isUniform - if false animCurve will modify object X scale and animCurveY - Y scale.

Notes

  • If you want to stop the animation call the ResetTween() method.
  • In some cases it can create spikes due to redrawing on change, it is recommended to use it on simple objects in separated canvases to avoid redrawing full canvas.
  • If you want to scale object only in 1 axis select non unifor and use linear curve from 1 to 1 to lock the scale.

Definition at line 30 of file UI_TweenScale.cs.

Member Function Documentation

◆ Play()

void UnityEngine.UI.Extensions.UI_TweenScale.Play ( )

Definition at line 65 of file UI_TweenScale.cs.

◆ ResetTween()

void UnityEngine.UI.Extensions.UI_TweenScale.ResetTween ( )

Definition at line 98 of file UI_TweenScale.cs.

Member Data Documentation

◆ animCurve

AnimationCurve UnityEngine.UI.Extensions.UI_TweenScale.animCurve

Definition at line 33 of file UI_TweenScale.cs.

◆ animCurveY

AnimationCurve UnityEngine.UI.Extensions.UI_TweenScale.animCurveY

Definition at line 51 of file UI_TweenScale.cs.

◆ isLoop

bool UnityEngine.UI.Extensions.UI_TweenScale.isLoop = false

Definition at line 39 of file UI_TweenScale.cs.

◆ isUniform

bool UnityEngine.UI.Extensions.UI_TweenScale.isUniform = true

Definition at line 49 of file UI_TweenScale.cs.

◆ playAtAwake

bool UnityEngine.UI.Extensions.UI_TweenScale.playAtAwake = false

Definition at line 43 of file UI_TweenScale.cs.

◆ speed

float UnityEngine.UI.Extensions.UI_TweenScale.speed = 1

Definition at line 35 of file UI_TweenScale.cs.


The documentation for this class was generated from the following file: