Paint - Capi-Metaverse/Template GitHub Wiki
This package contains two prefabs, one dedicated to single player mode and the other to multiplayer mode.
The general structure of this prefab consists of a canvas panel where you can draw, a camera that must focus on the panel and a small interface to show the user the button to press to start painting.

-
Let users draw in a panel on a Unity Scene.
-
Users can change the brush color and its thickness.
-
Users can upload an image to the canvas to draw on top of it.
-
Add the prefab to the scene.
-
Adjust the Box Collider of the prefab.
-
Add to your character the player tag.
-
Add to your camera the main camera tag.
-
Call in your script SetRunner from PaintZonePhoton if it’s online.
-
Call in your script SetCurrentPlayer from PaintZonePhoton if it’s online.
-
Play the scene.
-
Box Collider: This collider is used to specify the zone where the user will be allowed to switch to drawing mode. It can be moved and its dimensions can be modified.
-
Paint Zone && PaintZonePhoton: These are the main script of the component and control all collision zone operation and user input for mode change. The Photon one is specific to multiplayer.
-
RPCPaint: This script works with the Photon RPCs to send draw information to the other users.
-
UploadImage This script uploads an image to the canvas. This script is in progress.
-
Box Collider: This collider is used to specify the zone where the user will be allowed to draw.
-
Draw Lines && Draw Lines Photon: These scripts are in charge of drawing the lines drawn by the user with the cursor.
-
ColorPicker Script: This script lets you change the color of the brush.
-
ToggleVisibility: This script is in charge of activating and deactivating the color selector.