Video Player Stop#
Video / Video Player / Video Player Stop
Description#
Executes the Stop method on the Video Player 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.Video;
namespace VisualScript.Runtime
{
[Title("Video Player Stop")]
[Category("Video/Video Player/Stop")]
[Description("Executes the Stop method on the Video Player component")]
[Image(typeof(IconVideo), ColorTheme.Type.Blue)]
[Keywords("Movie, Film")]
[Serializable]
public class GenInstructionVideoPlayer_Stop_0 : Instruction
{
[SerializeField] private GetGameObject m_VideoPlayer = new GetGameObject(
new GenTypeGameObject_VideoPlayer()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Stop");
return $"{this.m_VideoPlayer} {method}";
}
protected override Awaitable Run(Args args)
{
VideoPlayer component = this.m_VideoPlayer.Get<VideoPlayer>(args);
if (component == null) return Done;
component.Stop();
return Done;
}
}
}