Renderer Mesh Lod Selection Bias#
Mesh / Renderer / Renderer Mesh Lod Selection Bias
Can Read
Can Write
Description#
The Mesh Lod Selection Bias property of the Renderer 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;
namespace VisualScript.Runtime
{
[Get]
[Set]
[Title("Renderer Mesh Lod Selection Bias")]
[Category("Mesh/Renderer/Mesh Lod Selection Bias")]
[Description("The Mesh Lod Selection Bias property of the Renderer component")]
[Image(typeof(IconMesh), ColorTheme.Type.Blue)]
[Serializable]
public class GenTypeNumber_Renderer_MeshLodSelectionBias : TypeNumber
{
[SerializeField] private GetGameObject m_Renderer = new GetGameObject(
new GenTypeGameObject_Renderer()
);
public override double GetPreview(GameObject source)
{
GameObject instance = this.m_Renderer.GetPreview(source);
if (instance == null) return default;
Renderer component = instance.GetComponent<Renderer>();
return component != null ? component.meshLodSelectionBias : default;
}
public override double Get(Args args)
{
Renderer instance = this.m_Renderer.Get<Renderer>(args);
return instance != null
? instance.meshLodSelectionBias
: default;
}
public override void Set(double value, Args args)
{
Renderer component = this.m_Renderer.Get<Renderer>(args);
if (component != null) component.meshLodSelectionBias = (float) value;
}
public override string ToString()
{
return $"{this.m_Renderer} Mesh Lod Selection Bias";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}