Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

GraphMotion

class in Unity.GraphToolkit.Editor.GraphVisualization

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

Description

Controls progress animations in a visualization Context.

Obtain an instance from Context.Motion. Each method targets a graph element identified by a reference produced by the same Context. The owning context scopes animations: stopping or pausing through one GraphMotion instance only affects the nodes referenced by that instance. Call GraphMotion.Play after GraphMotion.Pause to resume the looped animation.

Additional resources: Context.Motion, NodeReference

 NodeReference nodeRef = context.GetNodeReference(nodeID);

// Start a looping animation on the node. context.Motion.Play(nodeRef);

// Pause it without hiding the accent bar. context.Motion.Pause(nodeRef);

// Resume the animation at a faster speed. context.Motion.Play(nodeRef, animationSpeed: 2f);

// Stop the animation. If a FillAmount was set, the bar remains visible at that fill. context.Motion.Stop(nodeRef);

Public Methods

Method Description
Pause Pauses the looping animation on the referenced node's accent without hiding it.
Play Starts a looping animation on the referenced node's accent.
Stop Stops the looping animation on the referenced node's accent and hides it.