You can test and debug components and SDK functionalities with many test-scenes located at kernel/public/test-scenes/
, running the client in debug
mode.
-
Start the regular kernel server in a terminal at '/kernel' and leave it watching for changes
make watch
-
In another terminal in '/kernel' run the following command to build the test scenes and keep watching changes on them (changes will be visible when refreshing the browser):
make watch-only-test-scenes
Note that the test-scenes building may take a while (10 mins or more).
-
To run the client in
debug
mode, append the following query parameter to the URL: -
To spawn at the specific coordinates of a test scene append the position query paramter:
NOTE(optional): If you don't need to modify the test-scenes and just build them once, you may only run once make test-scenes
(it takes a while) and that'd be it.
- Create a new folder in
kernel/public/test-scenes
. - Go to the new created folder.
- Run
dcl init
. This will create the basic files structure with an example scene. - Run
dcl start
. A new tab in your browser will be open with your new scene in preview mode.
- Go to the scene folder.
- Compile the scene dependencies (run only one of the following options):
- OPTION A: For working with the @latest Kernel version, run
decentraland-ecs@latest
. - OPTION B: For working with the @next Kernel version, run
decentraland-ecs@next
.
- Run
dcl start
. A new tab in your browser will be open with the scene in preview mode.
- Go to the kernel folder.
- Run
make watch
and wait for the process ends. - Kill the server, run
make npm-link
and wait for the process ends. - Go to the scene folder.
- Run
npm link decentraland-ecs
. - Run
dcl start
. A new tab in your browser will be open with the scene in preview mode.
- Go to the scene folder.
- Compile the scene dependencies:
a. For working with the @latest Kernel version, run
decentraland-ecs@latest
. b. For working with the @next Kernel version, rundecentraland-ecs@next
. - Run
dcl start
. A new tab in your browser will be open with the scene in preview mode. - In Unity, deactivate the "Open Browser When Start" flag (
WSSController
game object in theInitialScene
scene). - Click on PLAY button.
- Go to the browser tab that was opened by the previous
dcl start
command and append the following query parameter to the url:&ws=ws://localhost:4999/dcl
. - Notice that the Unity editor starts loading the scene.
- Go to the kernel folder.
- Run
make watch
and wait for the process ends. - Kill the server, run
make npm-link
and wait for the process ends. - Go to the scene folder.
- Run
npm link decentraland-ecs
. - Run
dcl start
. A new tab in your browser will be open with the scene in preview mode. - In Unity, deactivate the "Open Browser When Start" flag (
WSSController
game object in theInitialScene
scene). - Click on PLAY button.
- Go to the browser tab that was opened by the previous
dcl start
command and append the following query parameter to the url:&ws=ws://localhost:4999/dcl
. - Notice that the Unity editor starts loading the scene.