HomeGuidesLearn about the Immerse SDK installerLog In

A Snap Target is what a [Snapper](🔗) snaps to, making it a child in the hierarchy. The Snap Target is also decides which [Snapper](🔗) is allowed to snap to it via the Requirements list ([see below](🔗))


SnapTarget component as it appears in the Inspector

# Requirements

Requirements are what restrict which [Snappers](🔗) are allowed to snap to it. A Snap Target with no requirements will allow any [Snapper](🔗) to snap to it.

### Add

To add a requirement to a Snap Target:

  1. Expand the Requirements array if not already

  2. Click the 'Add Requirement' button

  3. Select the desired requirement from the menu

### Remove

To remove a requirement from a Snap Target:

  1. Expand the Requirements array if not already

  2. Right click the requirement to be removed

  3. Select 'Delete Array Element'

Snap Target requirements are processed in the order they appear in the list

## Custom Requirements

A number of commonly used requirements are included with the SDK including an 'Allow List', 'Block List' and 'Max Angle' (which only allows snapping within a limited rotation range).

Creating your own requirements is easy. Simply create a [Serializable](🔗) class that inherits the `ISnapRequirement` interface. Once created, it will automatically be added to the 'Add Requirements' menu.

Below is the implementation for the included Allow List requirement:

# Events

Snap Targets provide events that can be used for triggering gameplay logic in an experience.

Column Title
On SnapTriggered when a Snapper is snapped to the Snap Target
On UnsnapTriggered when a Snapper is unsnapped from the Snap Target
On Hover EnterTriggered when a valid Snapper is held near the Snap Target
On Hover ExitTriggered when a previously valid Snapper leaves the snapping range of the Snap Target