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

Input Field Is Focused#

UI / Interaction / Input Field / Input Field Is Focused

  • Can Read

  • Cannot Write

Description#

The Is Focused property of the Input Field 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
{
    [Get]
    
    [Title("Input Field Is Focused")]
    [Category("UI/Interaction/Input Field/Is Focused")]
    [Description("The Is Focused property of the Input Field component")]
    
    [Image(typeof(IconUIInputField), ColorTheme.Type.TextLight)]
    [Keywords("UI, User, Interface")]
    
    [Serializable]
    public class GenTypeBool_InputField_IsFocused : TypeBool
    {
        [SerializeField] private GetGameObject m_InputField = new GetGameObject(
            new GenTypeGameObject_InputField()
        );
        
        public override bool GetPreview(GameObject source)
        {
            GameObject instance = this.m_InputField.GetPreview(source);
            if (instance == null) return default;
            
            InputField component = instance.GetComponent<InputField>();
            return component != null ? component.isFocused : default;
        }
        
        public override bool Get(Args args)
        {
            InputField instance = this.m_InputField.Get<InputField>(args);
            return instance != null
                ? instance.isFocused
                : default;
        }
        
        public override string ToString()
        {
            return $"{this.m_InputField} Is Focused";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

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