Light Dilated Range#
Rendering / Light / Light Dilated Range
Can Read
Cannot Write
Description#
The Dilated Range property of the Light component
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("Light Dilated Range")]
[Category("Rendering/Light/Dilated Range")]
[Description("The Dilated Range property of the Light component")]
[Image(typeof(IconLight), ColorTheme.Type.Yellow)]
[Serializable]
public class GenTypeNumber_Light_DilatedRange : TypeNumber
{
[SerializeField] private GetGameObject m_Light = new GetGameObject(
new GenTypeGameObject_Light()
);
public override double GetPreview(GameObject source)
{
GameObject instance = this.m_Light.GetPreview(source);
if (instance == null) return default;
Light component = instance.GetComponent<Light>();
return component != null ? component.dilatedRange : default;
}
public override double Get(Args args)
{
Light instance = this.m_Light.Get<Light>(args);
return instance != null
? instance.dilatedRange
: default;
}
public override string ToString()
{
return $"{this.m_Light} Dilated Range";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}