Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Set Terrain Draw Instanced#

Miscellaneous / Terrain / Set Terrain Draw Instanced

Description#

Sets the Draw Instanced 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 Instanced")]
    [Category("Miscellaneous/Terrain/Draw Instanced")]
    [Description("Sets the Draw Instanced property of Terrain component")]
    
    [Image(typeof(IconTerrain), ColorTheme.Type.Lime)]
    
    [Parameter("Terrain")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenInstructionBool_Terrain_SetDrawInstanced : 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 Instanced");
            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.drawInstanced = (bool) this.m_Value.Get(args);
            
            return Done;
        }
    }
}

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.