# Light Use Bounding Sphere Override

[Rendering](../index.md) / [Light](index.md) / **Light Use Bounding Sphere Override**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :green_circle: Can Write

</div>

## Description

The Use Bounding Sphere Override property of the Light component

## Code

```cs
// <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 Use Bounding Sphere Override")]
    [Category("Rendering/Light/Use Bounding Sphere Override")]
    [Description("The Use Bounding Sphere Override property of the Light component")]
    
    [Image(typeof(IconLight), ColorTheme.Type.Yellow)]
    
    [Serializable]
    public class GenTypeBool_Light_UseBoundingSphereOverride : 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.useBoundingSphereOverride : default;
        }
        
        public override bool Get(Args args)
        {
            Light instance = this.m_Light.Get<Light>(args);
            return instance != null
                ? instance.useBoundingSphereOverride
                : default;
        }
        
        public override void Set(bool value, Args args)
        {
            Light component = this.m_Light.Get<Light>(args);
            if (component != null) component.useBoundingSphereOverride = (bool) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_Light} Use Bounding Sphere Override";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}


```

