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