Animation Sync Layer#
Animation / Animation / Animation Sync Layer
Description#
Executes the Sync Layer method on the Animation component
Parameters#
| Name | Description |
|---|---|
| Layer |
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("Animation Sync Layer")]
[Category("Animation/Animation/Sync Layer")]
[Description("Executes the Sync Layer method on the Animation component")]
[Image(typeof(IconAnimation), ColorTheme.Type.Teal)]
[Keywords("Animation, Clip, Play, Animate")]
[Parameter("Layer")]
[Serializable]
public class GenInstructionAnimation_SyncLayer_1 : Instruction
{
[SerializeField] private GetGameObject m_Animation = new GetGameObject(
new GenTypeGameObject_Animation()
);
[SerializeField] private GetInteger m_Layer = new GetInteger();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Sync Layer");
return $"{this.m_Animation} {method} ({this.m_Layer})";
}
protected override Awaitable Run(Args args)
{
Animation component = this.m_Animation.Get<Animation>(args);
if (component == null) return Done;
component.SyncLayer(
(int) this.m_Layer.Get(args)
);
return Done;
}
}
}