Video Player Pixel Aspect Ratio Denominator#
Video / Video Player / Video Player Pixel Aspect Ratio Denominator
Can Read
Cannot Write
Description#
The Pixel Aspect Ratio Denominator property of 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
{
[Get]
[Title("Video Player Pixel Aspect Ratio Denominator")]
[Category("Video/Video Player/Pixel Aspect Ratio Denominator")]
[Description("The Pixel Aspect Ratio Denominator property of the Video Player component")]
[Image(typeof(IconVideo), ColorTheme.Type.Blue)]
[Keywords("Movie, Film")]
[Serializable]
public class GenTypeInteger_VideoPlayer_PixelAspectRatioDenominator : TypeNumber
{
[SerializeField] private GetGameObject m_VideoPlayer = new GetGameObject(
new GenTypeGameObject_VideoPlayer()
);
public override double GetPreview(GameObject source)
{
GameObject instance = this.m_VideoPlayer.GetPreview(source);
if (instance == null) return default;
VideoPlayer component = instance.GetComponent<VideoPlayer>();
return component != null ? component.pixelAspectRatioDenominator : default;
}
public override double Get(Args args)
{
VideoPlayer instance = this.m_VideoPlayer.Get<VideoPlayer>(args);
return instance != null
? instance.pixelAspectRatioDenominator
: default;
}
public override string ToString()
{
return $"{this.m_VideoPlayer} Pixel Aspect Ratio Denominator";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}