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

Dropdown Clear Options#

UI / Interaction / Dropdown / Dropdown Clear Options

Description#

Executes the Clear Options method on the Dropdown 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.UI;

namespace VisualScript.Runtime
{
    [Title("Dropdown Clear Options")]
    [Category("UI/Interaction/Dropdown/Clear Options")]
    [Description("Executes the Clear Options method on the Dropdown component")]
    
    [Image(typeof(IconUIDropdown), ColorTheme.Type.TextLight)]
    [Keywords("UI, User, Interface")]
    
    [Serializable]
    public class GenInstructionDropdown_ClearOptions_0 : Instruction
    {
        [SerializeField] private GetGameObject m_Dropdown = new GetGameObject(
            new GenTypeGameObject_Dropdown()
        );
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Clear Options");
            return $"{this.m_Dropdown} {method}";
        }
        
        protected override Awaitable Run(Args args)
        {
            Dropdown component = this.m_Dropdown.Get<Dropdown>(args);
            if (component == null) return Done;
            
            component.ClearOptions();
            
            return Done;
        }
    }
}

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