LOD Group Last LOD Billboard#
Rendering / LOD Group / LOD Group Last LOD Billboard
Can Read
Can Write
Description#
The Last LOD Billboard property of 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
{
[Get]
[Set]
[Title("LOD Group Last LOD Billboard")]
[Category("Rendering/LOD Group/Last LOD Billboard")]
[Description("The Last LOD Billboard property of the LOD Group component")]
[Image(typeof(IconLOD), ColorTheme.Type.Blue)]
[Serializable]
public class GenTypeBool_LODGroup_LastLODBillboard : TypeBool
{
[SerializeField] private GetGameObject m_LODGroup = new GetGameObject(
new GenTypeGameObject_LODGroup()
);
public override bool GetPreview(GameObject source)
{
GameObject instance = this.m_LODGroup.GetPreview(source);
if (instance == null) return default;
LODGroup component = instance.GetComponent<LODGroup>();
return component != null ? component.lastLODBillboard : default;
}
public override bool Get(Args args)
{
LODGroup instance = this.m_LODGroup.Get<LODGroup>(args);
return instance != null
? instance.lastLODBillboard
: default;
}
public override void Set(bool value, Args args)
{
LODGroup component = this.m_LODGroup.Get<LODGroup>(args);
if (component != null) component.lastLODBillboard = (bool) value;
}
public override string ToString()
{
return $"{this.m_LODGroup} Last LOD Billboard";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}