Playable Director Stopped#
Timeline / Playable Director / Playable Director Stopped
Description#
Executes whenever the Stopped event of Playable Director component is invoked
Parameters#
| Name | Description |
|---|---|
| Source |
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 Stopped")]
[Category("Timeline/Playable Director/Stopped")]
[Description("Executes whenever the Stopped event of Playable Director component is invoked")]
[Image(typeof(IconDirector), ColorTheme.Type.Teal)]
[Keywords("Timeline, Cutscene, Cinematic, Sequence")]
[Parameter("Source")]
[Serializable]
public class GenTriggerPlayableDirector_Stopped : TriggerSourceComponentBase<PlayableDirector>
{
public GenTriggerPlayableDirector_Stopped() : base(new GenTypeGameObject_PlayableDirector())
{ }
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Stopped");
return $"{this.SourceName} {member}";
}
protected override void OnSourceChanged(PlayableDirector previousSource, PlayableDirector newSource)
{
if (previousSource != null)
{
previousSource.stopped -= this.Run;
}
if (newSource != null)
{
newSource.stopped += this.Run;
}
}
private void Run(PlayableDirector value1)
{
using Args args = Args.Get(
this.Component,
this.m_CurrentSource
);
this.Run(args);
}
}
}