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

Light Force Visible#

Rendering / Light / Light Force Visible

  • Can Read

  • Can Write

Description#

The Force Visible property of the Light 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.Rendering;

namespace VisualScript.Runtime
{
    [Get]
    [Set]
    
    [Title("Light Force Visible")]
    [Category("Rendering/Light/Force Visible")]
    [Description("The Force Visible property of the Light component")]
    
    [Image(typeof(IconLight), ColorTheme.Type.Yellow)]
    
    [Serializable]
    public class GenTypeBool_Light_ForceVisible : TypeBool
    {
        [SerializeField] private GetGameObject m_Light = new GetGameObject(
            new GenTypeGameObject_Light()
        );
        
        public override bool GetPreview(GameObject source)
        {
            GameObject instance = this.m_Light.GetPreview(source);
            if (instance == null) return default;
            
            Light component = instance.GetComponent<Light>();
            return component != null ? component.forceVisible : default;
        }
        
        public override bool Get(Args args)
        {
            Light instance = this.m_Light.Get<Light>(args);
            return instance != null
                ? instance.forceVisible
                : default;
        }
        
        public override void Set(bool value, Args args)
        {
            Light component = this.m_Light.Get<Light>(args);
            if (component != null) component.forceVisible = (bool) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_Light} Force Visible";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

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