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