Playable Director Stop#
Timeline / Playable Director / Playable Director Stop
Description#
Executes the Stop method on the Playable Director component
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;
using UnityEngine.Playables;
namespace VisualScript.Runtime
{
[Title("Playable Director Stop")]
[Category("Timeline/Playable Director/Stop")]
[Description("Executes the Stop method on the Playable Director component")]
[Image(typeof(IconDirector), ColorTheme.Type.Teal)]
[Keywords("Timeline, Cutscene, Cinematic, Sequence")]
[Serializable]
public class GenInstructionPlayableDirector_Stop_0 : Instruction
{
[SerializeField] private GetGameObject m_PlayableDirector = new GetGameObject(
new GenTypeGameObject_PlayableDirector()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Stop");
return $"{this.m_PlayableDirector} {method}";
}
protected override Awaitable Run(Args args)
{
PlayableDirector component = this.m_PlayableDirector.Get<PlayableDirector>(args);
if (component == null) return Done;
component.Stop();
return Done;
}
}
}