Camera Current#
Rendering / Camera / Camera Current
Can Read
Cannot Write
Description#
The Current static property of the Camera class
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 Current")]
[Category("Rendering/Camera/Current")]
[Description("The Current static property of the Camera class")]
[Image(typeof(IconCamera), ColorTheme.Type.Blue)]
[Serializable]
public class GenTypeGameObject_Camera_Current : TypeGameObject
{
public override GameObject GetPreview(GameObject source)
{
return Camera.current.gameObject;
}
public override GameObject Get(Args args)
{
return Camera.current.gameObject;
}
public override U Get<U>(Args args)
{
if (typeof(U) == typeof(Camera))
{
return Camera.current as U;
}
return base.Get<U>(args);
}
public override string ToString()
{
return $"Camera Current";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}