Set Reflection Probe Importance#
Rendering / Reflection Probe / Set Reflection Probe Importance
Description#
Sets the Importance property of Reflection Probe component
Parameters#
| Name | Description |
|---|---|
| Reflection Probe | |
| 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("Set Reflection Probe Importance")]
[Category("Rendering/Reflection Probe/Importance")]
[Description("Sets the Importance property of Reflection Probe component")]
[Image(typeof(IconReflectionProbe), ColorTheme.Type.Blue)]
[Parameter("Reflection Probe")]
[Parameter("Value")]
[Serializable]
public class GenInstructionInteger_ReflectionProbe_SetImportance : Instruction
{
[SerializeField] private GetGameObject m_ReflectionProbe = new GetGameObject(
new GenTypeGameObject_ReflectionProbe()
);
[SerializeField] private GetInteger m_Value = new GetInteger();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Importance");
return $"{this.m_ReflectionProbe} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
ReflectionProbe component = this.m_ReflectionProbe.Get<ReflectionProbe>(args);
if (component == null) return Done;
component.importance = (int) this.m_Value.Get(args);
return Done;
}
}
}