Video Player Play#
Video / Video Player / Video Player Play
Description#
Executes the Play 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 Play")]
[Category("Video/Video Player/Play")]
[Description("Executes the Play method on the Video Player component")]
[Image(typeof(IconVideo), ColorTheme.Type.Blue)]
[Keywords("Movie, Film")]
[Serializable]
public class GenInstructionVideoPlayer_Play_0 : Instruction
{
[SerializeField] private GetGameObject m_VideoPlayer = new GetGameObject(
new GenTypeGameObject_VideoPlayer()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Play");
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.Play();
return Done;
}
}
}