π Quickstart: Your First Implementation
The fastest way to integrate the Canley Colour Picker is to follow this 5-step workflow.
1. Scene Requirements
- The Picker: Drag the
Canley Colour Pickerprefab into your Canvas. - The Target: Create a 3D object (e.g., a Cube) you want to colorize.
- The Trigger: Create a UI Button to open the picker.
2. The Manager Setup
The Manager acts as the βbrainβ connecting your game world to the UI.
- Create an empty GameObject named
DemoManager. - Attach the
DemoManager.csscript to it.
3. Inspector Wiring
In the DemoManager inspector[cite: 341]:
- Picker: Drag the
CanleyColourController(on the prefab) here. - Picker Panel: Drag the root UI GameObject of the picker here.
- Cube Renderer: Drag your Cubeβs
MeshRendererinto this slot.
4. Connecting the Button
- Select your UI Button and find the
OnClick()list. - Click the + icon and drag your
DemoManagerobject into the slot. - Select
DemoManager -> OpenPicker()from the function dropdown.
5. The Result
Press Play. When you move sliders, the OnLiveUpdate event sends colour data to the DemoManager, updating your material in real-time.