docs.unity.cn
    Show / Hide Table of Contents

    Method IsActiveAndEnabled

    IsActiveAndEnabled()

    Checks if the GameObject is active and enabled.

    Declaration
    public bool IsActiveAndEnabled()
    Returns
    Type Description
    Boolean

    Returns true if the GameObject is active and enabled.

    Remarks

    This takes a dependency on the active and enable state

    IsActiveAndEnabled(Component)

    Checks if the GameObject is active and enabled for a given component.

    Declaration
    public bool IsActiveAndEnabled(Component component)
    Parameters
    Type Name Description
    Component component

    The Object to check.

    Returns
    Type Description
    Boolean

    Returns true if the GameObject is active and enabled.

    Remarks

    This takes a dependency on the active and enable state.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023