Link component
The Link component allows you to create interactive elements that navigate users to a specified URL when activated. This is useful for creating interactive kiosks, signs, or objects that provide additional information or redirect users to other resources.
When configuring the Link component in an entity, it comes with two additional required components:
- Interactable component: Enables entities to respond to user interactions, such as clicks or key presses.
The Link component relies on these proper interaction mechanics to work correctly.
Property | Description |
---|---|
Open in new tab | Determines whether the URL opens in a new browser tab (True) or redirects the current tab (False). |
Link URL | The web address to navigate to when the link is activated. |
To use the Link component, configure the following options:
Property | Suggested Setting |
---|---|
Label | Enter a prompt like "Click to visit website." |
Activation Type | Set to Hover or Proximity based on how users should initiate the interaction. |
Click to Interact | Enable this if users need to click after activation. |
Callback options:
Property | Setting |
---|---|
Target | Set to Self. |
Callback ID | Select linkCallback to redirect the user to the link. |
The Input component listens for user actions and sends them to the Interactable component for processing.
- Use the Open in new tab option to control whether the link opens in a new tab or redirects the current page.
- Be cautious when redirecting the current page, as it can disrupt the user's session.