LOD Group Lod Count#
Rendering / LOD Group / LOD Group Lod Count
Description#
Compares the Lod Count property of LOD Group component to another value
Parameters#
| Name | Description |
|---|---|
| LOD Group | |
| 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("LOD Group Lod Count")]
[Category("Rendering/LOD Group/Lod Count")]
[Description("Compares the Lod Count property of LOD Group component to another value")]
[Image(typeof(IconLOD), ColorTheme.Type.Blue)]
[Parameter("LOD Group")]
[Parameter("Compare")]
[Parameter("Value")]
[Serializable]
public class GenConditionInteger_LODGroup_CheckLodCount : Condition
{
[SerializeField] private GetGameObject m_LODGroup = new GetGameObject(
new GenTypeGameObject_LODGroup()
);
[SerializeField] private CompareNumber m_Compare = new CompareNumber();
[SerializeField] private GetInteger m_Value = new GetInteger();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Lod Count");
return $"{this.m_LODGroup} {member} {this.m_Compare} {this.m_Value}";
}
protected override bool Run(Args args)
{
LODGroup component = this.m_LODGroup.Get<LODGroup>(args);
if (component == null) return false;
return this.m_Compare.Compare(component.lodCount, (int) this.m_Value.Get(args));
}
}
}