Set Terrain Draw Heightmap#
Miscellaneous / Terrain / Set Terrain Draw Heightmap
Description#
Sets the Draw Heightmap property of Terrain component
Parameters#
| Name | Description |
|---|---|
| Terrain | |
| 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;
namespace VisualScript.Runtime
{
[Title("Set Terrain Draw Heightmap")]
[Category("Miscellaneous/Terrain/Draw Heightmap")]
[Description("Sets the Draw Heightmap property of Terrain component")]
[Image(typeof(IconTerrain), ColorTheme.Type.Lime)]
[Parameter("Terrain")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_Terrain_SetDrawHeightmap : Instruction
{
[SerializeField] private GetGameObject m_Terrain = new GetGameObject(
new GenTypeGameObject_Terrain()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Draw Heightmap");
return $"{this.m_Terrain} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
Terrain component = this.m_Terrain.Get<Terrain>(args);
if (component == null) return Done;
component.drawHeightmap = (bool) this.m_Value.Get(args);
return Done;
}
}
}