Version: 2019.4
LanguageEnglish
  • C#
Experimental: this API is experimental and might be changed or removed in the future.

ITransitionAnimations.Start

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public ValueAnimation<Color> Start(Color from, Color to, int durationMs, Action<VisualElement,Color> onValueChanged);

Declaration

public ValueAnimation<Color> Start(Func<VisualElement,Color> fromValueGetter, Color to, int durationMs, Action<VisualElement,Color> onValueChanged);

Parameters

from Start value.
to End value.
durationMs Duration of the transition in milliseconds.
onValueChanged Callback that applies the interpolated value.
fromValueGetter Callback that provides the initial value.

Returns

ValueAnimation<Color> The created animation object.

Description

Starts a transition animation on this VisualElement.