docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GameObjectExtension

    Extensions to create new Lights in HDRP.

    Inheritance
    object
    GameObjectExtension
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering.HighDefinition
    Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
    Syntax
    public static class GameObjectExtension

    Methods

    AddHDLight(GameObject, LightType)

    Add a new HDRP Light to a GameObject

    Declaration
    public static HDAdditionalLightData AddHDLight(this GameObject gameObject, LightType type)
    Parameters
    Type Name Description
    GameObject gameObject

    The GameObject on which the light is going to be added

    LightType type

    The Type of the HDRP light to Add

    Returns
    Type Description
    HDAdditionalLightData

    The created HDRP Light component

    AddHDLight(GameObject, HDLightTypeAndShape)

    Add a new HDRP Light to a GameObject

    Declaration
    [Obsolete("This method has been deprecated. Use the AddHDLight(LightType) overload instead.", false)]
    public static HDAdditionalLightData AddHDLight(this GameObject gameObject, HDLightTypeAndShape lightTypeAndShape)
    Parameters
    Type Name Description
    GameObject gameObject

    The GameObject on which the light is going to be added

    HDLightTypeAndShape lightTypeAndShape

    The type and shape of the HDRP light to Add

    Returns
    Type Description
    HDAdditionalLightData

    The created HDRP Light component

    RemoveHDLight(GameObject)

    Remove the HD Light components from a GameObject.

    Declaration
    public static void RemoveHDLight(this GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject

    The GameObject on which the light is going to be removed

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)