Light Intensity#
Rendering / Light / Light Intensity
Description#
Compares the Intensity property of Light component to another value
Parameters#
| Name | Description |
|---|---|
| Light | |
| Compare | |
| 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("Light Intensity")]
[Category("Rendering/Light/Intensity")]
[Description("Compares the Intensity property of Light component to another value")]
[Image(typeof(IconLight), ColorTheme.Type.Yellow)]
[Parameter("Light")]
[Parameter("Compare")]
[Parameter("Value")]
[Serializable]
public class GenConditionNumber_Light_CheckIntensity : Condition
{
[SerializeField] private GetGameObject m_Light = new GetGameObject(
new GenTypeGameObject_Light()
);
[SerializeField] private CompareNumber m_Compare = new CompareNumber();
[SerializeField] private GetNumber m_Value = new GetNumber();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Intensity");
return $"{this.m_Light} {member} {this.m_Compare} {this.m_Value}";
}
protected override bool Run(Args args)
{
Light component = this.m_Light.Get<Light>(args);
if (component == null) return false;
return this.m_Compare.Compare(component.intensity, (float) this.m_Value.Get(args));
}
}
}