Set Video Player Frame#
Video / Video Player / Set Video Player Frame
Description#
Sets the Frame property of Video Player component
Parameters#
| Name | Description |
|---|---|
| Video Player | |
| Value |
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("Set Video Player Frame")]
[Category("Video/Video Player/Frame")]
[Description("Sets the Frame property of Video Player component")]
[Image(typeof(IconVideo), ColorTheme.Type.Blue)]
[Keywords("Movie, Film")]
[Parameter("Video Player")]
[Parameter("Value")]
[Serializable]
public class GenInstructionInteger_VideoPlayer_SetFrame : Instruction
{
[SerializeField] private GetGameObject m_VideoPlayer = new GetGameObject(
new GenTypeGameObject_VideoPlayer()
);
[SerializeField] private GetInteger m_Value = new GetInteger();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Frame");
return $"{this.m_VideoPlayer} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
VideoPlayer component = this.m_VideoPlayer.Get<VideoPlayer>(args);
if (component == null) return Done;
component.frame = (long) this.m_Value.Get(args);
return Done;
}
}
}