Terrain Preserve Tree Prototype Layers#
Miscellaneous / Terrain / Terrain Preserve Tree Prototype Layers
Description#
Compares the Preserve Tree Prototype Layers property of Terrain component to another value
Parameters#
| Name | Description |
|---|---|
| Terrain |
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
{
[Title("Terrain Preserve Tree Prototype Layers")]
[Category("Miscellaneous/Terrain/Preserve Tree Prototype Layers")]
[Description("Compares the Preserve Tree Prototype Layers property of Terrain component to another value")]
[Image(typeof(IconTerrain), ColorTheme.Type.Lime)]
[Parameter("Terrain")]
[Serializable]
public class GenConditionBool_Terrain_CheckPreserveTreePrototypeLayers : Condition
{
[SerializeField] private GetGameObject m_Terrain = new GetGameObject(
new GenTypeGameObject_Terrain()
);
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Preserve Tree Prototype Layers");
return $"{this.m_Terrain} {member}";
}
protected override bool Run(Args args)
{
Terrain component = this.m_Terrain.Get<Terrain>(args);
if (component == null) return false;
return component.preserveTreePrototypeLayers;
}
}
}