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