docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class InputActionPropertyExtensions

    Extension methods for UnityEngine.InputSystem.InputActionProperty.

    Inheritance
    object
    InputActionPropertyExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.Interaction.Toolkit.Inputs
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public static class InputActionPropertyExtensions

    Methods

    DisableDirectAction(InputActionProperty)

    Disable the action held on to by the property only if it represents an UnityEngine.InputSystem.InputAction directly. In other words, function will do nothing if the action has a non-null UnityEngine.InputSystem.InputActionProperty.reference property.

    Declaration
    public static void DisableDirectAction(this InputActionProperty property)
    Parameters
    Type Name Description
    InputActionProperty property

    The property to operate on.

    Remarks

    This can make it easier to allow the enabled state of the UnityEngine.InputSystem.InputAction serialized with a MonoBehaviour to be owned by the behavior itself, but let a reference type be managed elsewhere.

    EnableDirectAction(InputActionProperty)

    Enable the action held on to by the property only if it represents an UnityEngine.InputSystem.InputAction directly. In other words, function will do nothing if the action has a non-null UnityEngine.InputSystem.InputActionProperty.reference property.

    Declaration
    public static void EnableDirectAction(this InputActionProperty property)
    Parameters
    Type Name Description
    InputActionProperty property

    The property to operate on.

    Remarks

    This can make it easier to allow the enabled state of the UnityEngine.InputSystem.InputAction serialized with a MonoBehaviour to be owned by the behavior itself, but let a reference type be managed elsewhere.

    In This Article
    Back to top
    Copyright © 2025 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)