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.9.0.0 (3.9.0.0)
Syntax
C#
[HelpURLAttribute("https://immerse.readme.io/")]
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 propertyOnSnap
An event that is triggered when a TransformSync is snapped or unsnapped
Public propertyOverridingTransformSyncTolerances
Whether or not to override the tolerance settings for the transform sync that snaps to this target
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
Public propertySnappingDistanceTolerance
Custom override of snapping distance tolerance
Public propertySnappingRotationTolerance
Custom override of snapping rotation tolerance
Top
Methods
  NameDescription
Protected methodAwake
Unity Component Method
Public methodEnableSnappingGuide
Used to Enable snapping guide on a per snap target basis
Public methodForceDisableSnappingGuide
Used to disable snapping guide on a per snap target basis
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 methodHideSnappingGuide
Hides the alternative Snapping Guide.
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 methodOverrideTransformSyncTolerances
Override the default tolerances
Public methodSetAlternativeSnappingGuide
Sets an alternative Snapping Guide to display when previewing this snap target
Public methodShowSnappingGuide
Shows the alternative Snapping Guide.
Protected methodStart
Unity Component Method
Public methodUseTransformSyncTolerances
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_onSnap
Private field_overridingTransformSyncTolerances
Enable to override the tolerance for snapping for the specific snapTarget
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
Private field_snappingDistanceTolerance
override of snapping distance tolerance
Private field_snappingGuideAllowed
Private field_snappingRotationTolerance
override of snapping rotation tolerance
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