SnapTarget Class |
Namespace: ImmerseSDK.Interaction
[HelpURLAttribute("https://immerse.readme.io/")] public class SnapTarget : UnityEngine.MonoBehaviour
The SnapTarget type exposes the following members.
Name | Description | |
---|---|---|
SnapTarget | Initializes a new instance of the SnapTarget class |
Name | Description | |
---|---|---|
AllowPhysicsWhenSnapped |
Should physics be enabled after snapping?
| |
AlternativePreviewObject |
True if this object has an alternative preview
| |
HasAlternativePreview |
True if this object has an alternative preview
| |
IsOccupied |
Returns true if a TransformSync is already snapped to this target
| |
OccupiedBy |
The transform that is currently snapped
| |
OnSnap |
An event that is triggered when a TransformSync is snapped or unsnapped
| |
OverridingTransformSyncTolerances |
Whether or not to override the tolerance settings for the transform sync that snaps to this target
| |
ReparentWhenSnapped |
Should the TransformSync move to the same parent when snapping?
| |
Requirements |
Requirements that need to be met before snapping to this target is allowed
| |
RotationAxis |
Rotation Axis filter
| |
SnappingDistanceTolerance |
Custom override of snapping distance tolerance
| |
SnappingRotationTolerance |
Custom override of snapping rotation tolerance
|
Name | Description | |
---|---|---|
Awake |
Unity Component Method
| |
EnableSnappingGuide |
Used to Enable snapping guide on a per snap target basis
| |
ForceDisableSnappingGuide |
Used to disable snapping guide on a per snap target basis
| |
GetMaskedAngle(Transform, SnappingRotationAxis) |
Gets the angle using the provided axis
| |
GetMaskedAngle(Transform, Quaternion, SnappingRotationAxis, SnappingRotationAxis) |
Gets the angle using the provided axis
| |
HideSnappingGuide |
Hides the alternative Snapping Guide.
| |
IsOccupiedBy |
Check if this target is occupied by the specified transform
| |
IsValidTarget |
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.
| |
Occupy |
Marks this target as occupied by this transform
| |
OverrideTransformSyncTolerances |
Override the default tolerances
| |
SetAlternativeSnappingGuide |
Sets an alternative Snapping Guide to display when previewing this snap target
| |
ShowSnappingGuide |
Shows the alternative Snapping Guide.
| |
Start |
Unity Component Method
| |
UseTransformSyncTolerances |
Name | Description | |
---|---|---|
_allowPhysicsWhenSnapped |
Should physics be enabled after snapping?
| |
_interactionRequirements |
Requirements that need to be met before snapping to this target is allowed
| |
_onSnap | ||
_overridingTransformSyncTolerances |
Enable to override the tolerance for snapping for the specific snapTarget
| |
_previewObject |
Optional alternative object to use for previewing snap
| |
_reparentWhenSnapped |
Should the TransformSync move to the same parent when snapping?
| |
_rotationAxis |
Mask to allow certain axis to be ignored when checking for a match
| |
_snappingDistanceTolerance |
override of snapping distance tolerance
| |
_snappingGuideAllowed | ||
_snappingRotationTolerance |
override of snapping rotation tolerance
|
Name | Description | |
---|---|---|
GetCopyOf |
Copies all properties of a component from source to target. Uses reflection to set properties.
(Defined by ComponentExtensions.) | |
WaitForT |
Waits for a singleton on a coroutine
(Defined by SingletonManager.) |