Camera Command Buffer Count#
Rendering / Camera / Camera Command Buffer Count
Can Read
Cannot Write
Description#
The Command Buffer Count property of the Camera 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.Rendering;
namespace VisualScript.Runtime
{
[Get]
[Title("Camera Command Buffer Count")]
[Category("Rendering/Camera/Command Buffer Count")]
[Description("The Command Buffer Count property of the Camera component")]
[Image(typeof(IconCamera), ColorTheme.Type.Blue)]
[Serializable]
public class GenTypeInteger_Camera_CommandBufferCount : TypeNumber
{
[SerializeField] private GetGameObject m_Camera = new GetGameObject(
new GenTypeGameObject_Camera()
);
public override double GetPreview(GameObject source)
{
GameObject instance = this.m_Camera.GetPreview(source);
if (instance == null) return default;
Camera component = instance.GetComponent<Camera>();
return component != null ? component.commandBufferCount : default;
}
public override double Get(Args args)
{
Camera instance = this.m_Camera.Get<Camera>(args);
return instance != null
? instance.commandBufferCount
: default;
}
public override string ToString()
{
return $"{this.m_Camera} Command Buffer Count";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}