Interface IGrabObjects
Provides methods and delegates used to directly select and grab scene objects
Inherited Members
Namespace: Unity.Labs.EditorXR.Interfaces
Syntax
public interface IGrabObjects : IUsesCanGrabObject, IFunctionalitySubscriber<IProvidesCanGrabObject>, IFunctionalitySubscriber
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> |