Camera Current#
Rendering / Camera / Camera Current
Description#
Compares the Current static property of Camera class to another value
Parameters#
| Name | Description |
|---|---|
| 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.Rendering;
namespace VisualScript.Runtime
{
[Title("Camera Current")]
[Category("Rendering/Camera/Current")]
[Description("Compares the Current static property of Camera class to another value")]
[Image(typeof(IconCamera), ColorTheme.Type.Blue)]
[Parameter("Value")]
[Serializable]
public class GenConditionGameObject_Camera_CheckCurrent : Condition
{
[SerializeField] private GetGameObject m_Value = new GetGameObject();
protected override string GetTitle(GameObject source)
{
string className = TextUtils.ThemeAsKeyword("Camera");
string member = TextUtils.ThemeAsKeyword("Current");
return $"{className} {member} = {this.m_Value}";
}
protected override bool Run(Args args)
{
return Camera.current == this.m_Value.Get<Camera>(args);
}
}
}