SnapTarget Class |
Namespace: ImmerseSDK.Interaction
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
| |
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
|
Name | Description | |
---|---|---|
Awake |
Unity Component Method
| |
GetMaskedAngle(Transform, SnappingRotationAxis) |
Gets the angle using the provided axis
| |
GetMaskedAngle(Transform, Quaternion, SnappingRotationAxis, SnappingRotationAxis) |
Gets the angle using the provided axis
| |
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
| |
SetAlternativeOutline |
Sets an alternative outline to display when previewing this snap target
| |
ShowOutline |
Shows/Hides the alternative outline.
Returns true if an alternative outline exists, otherwise false if one was not set
| |
Start |
Unity Component Method
|
Name | Description | |
---|---|---|
_allowPhysicsWhenSnapped |
Should physics be enabled after snapping?
| |
_interactionRequirements |
Requirements that need to be met before snapping to this target is allowed
| |
_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
|
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.) |