Click or drag to resize

SnapTarget Class

Allows snapping of an object to a specified orientation while it's being engaged with
Inheritance Hierarchy
SystemObject
  UnityEngine.Object
    UnityEngine.Component
      UnityEngine.Behaviour
        UnityEngine.MonoBehaviour
          ImmerseSDK.InteractionSnapTarget
            ImmerseSDK.InteractionOriginSnapTarget

Namespace:  ImmerseSDK.Interaction
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.5.0.0 (3.5.0.0)
Syntax
C#
public class SnapTarget : UnityEngine.MonoBehaviour

The SnapTarget type exposes the following members.

Constructors
  NameDescription
Public methodSnapTarget
Initializes a new instance of the SnapTarget class
Top
Properties
  NameDescription
Public propertyAllowPhysicsWhenSnapped
Should physics be enabled after snapping?
Public propertyAlternativePreviewObject
True if this object has an alternative preview
Public propertyHasAlternativePreview
True if this object has an alternative preview
Public propertyIsOccupied
Returns true if a TransformSync is already snapped to this target
Public propertyOccupiedBy
The transform that is currently snapped
Public propertyReparentWhenSnapped
Should the TransformSync move to the same parent when snapping?
Public propertyRequirements
Requirements that need to be met before snapping to this target is allowed
Public propertyRotationAxis
Rotation Axis filter
Top
Methods
  NameDescription
Protected methodAwake
Unity Component Method
Public methodGetMaskedAngle(Transform, SnappingRotationAxis)
Gets the angle using the provided axis
Public methodStatic memberGetMaskedAngle(Transform, Quaternion, SnappingRotationAxis, SnappingRotationAxis)
Gets the angle using the provided axis
Public methodIsOccupiedBy
Check if this target is occupied by the specified transform
Public methodIsValidTarget
Returns true if the target is valid, otherwise false. This also checks that the GameObject is active in the hierarchy and that the component is enabled.
Public methodOccupy
Marks this target as occupied by this transform
Public methodSetAlternativeOutline
Sets an alternative outline to display when previewing this snap target
Public methodShowOutline
Shows/Hides the alternative outline. Returns true if an alternative outline exists, otherwise false if one was not set
Protected methodStart
Unity Component Method
Top
Fields
  NameDescription
Private field_allowPhysicsWhenSnapped
Should physics be enabled after snapping?
Private field_interactionRequirements
Requirements that need to be met before snapping to this target is allowed
Private field_previewObject
Optional alternative object to use for previewing snap
Private field_reparentWhenSnapped
Should the TransformSync move to the same parent when snapping?
Private field_rotationAxis
Mask to allow certain axis to be ignored when checking for a match
Top
Extension Methods
  NameDescription
Public Extension MethodGetCopyOf
Copies all properties of a component from source to target. Uses reflection to set properties.
(Defined by ComponentExtensions.)
Public Extension MethodWaitForT
Waits for a singleton on a coroutine
(Defined by SingletonManager.)
Top
See Also