XRC Create Tool
Overview
This package provides a tool for creating, deleting, and duplicating interactable objects or primitives into a scene. It is designed to work with the XR Interaction Toolkit and follows component based architecture for the tools, input, and feedback. By building off of XRI componentets like XR Grab Interactable, we can leverage some of the design choices of XRI.
The package video can be viewed here.
Components
Create Tool
The Create Tool component is responsible for creating, duplicating and deleting interactable objects in the scene. Its primary purpose is to allow users to quickly generate new game elements, replicate existing ones, and remove unwanted objects in a scene during runtime.
This component provides options for creating prefabs or primitive shapes. If using a prefab, you can assign the
Property | Description |
---|---|
Interactor | Interactor used for selecting objects. |
Left Hand | Left Hand transform. |
Right Hand | Right Hand transform. |
Object Prefab | Used if creating prefabs. It's okay to leave this property empty. |
Object Prefab | Used if creating prefabs. It's okay to leave this property empty. |
Uniform Scaling | If true, will scale the object uniformly based on the distance between Left and Right Hands. If false, uses the displacement between Left and Right Hands to scale along x, y, z axis seperately. |
Create Tool Input
Create Tool Input sets up input listeners to detect when the user initiates a draw or clear action. You attach this component to the same game object as Create Tool to ensure that user inputs are correctly interpreted for drawing actions.
Property | Description |
---|---|
Create Action | The Input Action Reference used for creating objects. |
Duplicate Action | The Input Action Reference used for duplicating objects. |
Delete Action | The Input Action Reference used for deleting objects. |
Create Tool Feedback
The Create Tool Feedback component handles the visual feedback of the create Tool. In this simple example, the feedback is just a transparent previewMaterial
which can be assigned in the inspector. The appearance such as color, or transparency are all set in the material.
Property | Description |
---|---|
Preview Material | The material used during preview. |
Installation instructions
Package Manager
Note
Before you install this package, you would need to install edu.cornell.xrc.core. Follow these installation instructions to fulfill this dependency. To install this package, follow these steps:
- In the Unity Editor, click on Window > Package Manager
- Click the + button and choose Add package from git URL option
- Paste this URL https://github.com/xrcollaboratory/edu.cornell.xrc.tools.create.git in the prompt and click on Add
- You might have to authenticate as this is a private repository
- The package should be installed into your project
- You can download Samples from under Samples
Requirements
This version of XRC Create Tool Tool is compatible with the following versions of the Unity Editor:
- 2022.4.7f1 LTS
Dependencies:
Samples
The package comes with a number of samples which can be installed directly from the Package Manager (from Unity's main menu, go to Window > Package Manager). Select the XRC Create Tool, then click Import next to a sample to copy it into the current project.
Sample | Description |
---|---|
XRC Create Tool | A basic XR scene setup with a create Tool. All the input and feedback is already configured. |