Interface IGrabObjects | Unity Reflect | 1.1.0-preview.6
docs.unity3d.com
    Show / Hide Table of Contents

    Interface IGrabObjects

    Provides methods and delegates used to directly select and grab scene objects

    Namespace: Unity.Labs.EditorXR.Interfaces
    Syntax
    public interface IGrabObjects : IUsesCanGrabObject, IFunctionalitySubscriber<IProvidesCanGrabObject>

    Methods

    DropHeldObjects(Node)

    Drop objects held with a given node

    Declaration
    void DropHeldObjects(Node node)
    Parameters
    Type Name Description
    Node node

    The node that is holding the objects

    Resume(Node)

    Resume acting on objects held with a given node

    Declaration
    void Resume(Node node)
    Parameters
    Type Name Description
    Node node

    The node that is holding the objects

    Suspend(Node)

    Stop acting on objects held with a given node

    Declaration
    void Suspend(Node node)
    Parameters
    Type Name Description
    Node node

    The node that is holding the objects

    TransferHeldObjects(Transform, Transform, Vector3)

    Transfer a held object between rayOrigins (i.e. dragging into the MiniWorld)

    Declaration
    void TransferHeldObjects(Transform rayOrigin, Transform destRayOrigin, Vector3 deltaOffset = null)
    Parameters
    Type Name Description
    Transform rayOrigin

    rayOrigin of current held object

    Transform destRayOrigin

    Destination rayOrigin

    Vector3 deltaOffset

    Change in position offset (added to GrabData.positionOffset)

    Events

    objectsDropped

    Must be called by the implementer when objects have been dropped Params: the rayOrigin, the dropped objects

    Declaration
    event Action<Transform, Transform[]> objectsDropped
    Event Type
    Type Description
    Action<Transform, Transform[]>

    objectsGrabbed

    Must be called by the implementer when an object has been grabbed Params: the rayOrign, the grabbed objects

    Declaration
    event Action<Transform, HashSet<Transform>> objectsGrabbed
    Event Type
    Type Description
    Action<Transform, HashSet<Transform>>

    objectsTransferred

    Must be called by the implementer when objects have been transferred Params: the source rayOrigin, the destination rayOrigin

    Declaration
    event Action<Transform, Transform> objectsTransferred
    Event Type
    Type Description
    Action<Transform, Transform>

    Extension Methods

    UsesCanGrabObjectMethods.CanGrabObject(IUsesCanGrabObject, GameObject, Transform)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023