LOD Group Recalculate Bounds#
Rendering / LOD Group / LOD Group Recalculate Bounds
Description#
Executes the Recalculate Bounds method on the LOD Group 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
{
[Title("LOD Group Recalculate Bounds")]
[Category("Rendering/LOD Group/Recalculate Bounds")]
[Description("Executes the Recalculate Bounds method on the LOD Group component")]
[Image(typeof(IconLOD), ColorTheme.Type.Blue)]
[Serializable]
public class GenInstructionLODGroup_RecalculateBounds_0 : Instruction
{
[SerializeField] private GetGameObject m_LODGroup = new GetGameObject(
new GenTypeGameObject_LODGroup()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Recalculate Bounds");
return $"{this.m_LODGroup} {method}";
}
protected override Awaitable Run(Args args)
{
LODGroup component = this.m_LODGroup.Get<LODGroup>(args);
if (component == null) return Done;
component.RecalculateBounds();
return Done;
}
}
}