Quick Start Guide
Getting the Decorating Toolkit up and running in your project only takes a few minutes. Follow these steps to set up your first draggable object.
1. Prepare your Player
The system needs a central hub to manage interactions.
- Add the
PlayerDecoratingControllercomponent to your main Player GameObject (the one that handles your camera or movement). - This component will act as the bridge between your input and the objects in the world.
TODO: Add a screenshot of the PlayerDecoratingController attached to a GameObject in the Inspector.
2. Create your Settings
The toolkit uses a central settings asset to keep everything organized.
- Right-click in your Project window and select
Create > DecoRat > Decorating > Toolkit Settings. - Assign this new asset to the Settings field on your
PlayerDecoratingController.
TODO: Add a screenshot showing the DecoratingToolkitSettings asset being assigned to the controller.
3. Hook up your Input
The toolkit is "input agnostic," meaning it doesn't care if you use the old Input Manager, the new Input System, or a custom solution. It just needs a "Pointer Source."
- Create a new script that implements the
IPointerSourceinterface. - If you're using the new Input System, you can check the
Examplesfolder for a pre-made implementation. - Attach your input script to a GameObject and assign it to the Pointer Source field on the controller.
4. Make an object draggable
Now for the fun part! To make an object interactive:
- Add a Rigidbody to the object (if it doesn't have one).
- Add the
RigidbodyPlaceablecomponent. This tells the toolkit, "Hey, I'm allowed to be picked up!"
TODO: Add a screenshot of a simple cube with Rigidbody and RigidbodyPlaceable components.
5. Configure the behavior
Before you can start dragging, you need to define how it feels.
- Create an Interactable Profile, Physics Drag Profile, and Placement Validation Profile (all found under the
Create > DecoRat > Decoratingmenu). - Assign these to your
DecoratingToolkitSettings. These profiles control things like how fast objects move, what layers they collide with, and whether they can overlap.
6. Test it out!
Press Play, click on your object, and try moving it around.
If you want to see a finished setup, take a look at the example scene in the Examples directory. It has everything configured and ready to go.
Want to add grid snapping? Check out the Grid Dragging guide.