Polygonal Mind
  • Home
  • Metaverse Builder
  • CryptoAvatars
  • MegaCube
  • Blog
  • Decentraland
  • Projects
  • Assets

Blog

How to Deploy a Scene in Decentraland

3/2/2022

0 Comments

 

The Mission

​This guide will take you through the deploying process and upon the end you will have full knowledge on the differences of each one and when to use type or another depending on the final purpose of your preview.

Resources​

  • Unity 2020.3.11f1
  • Node.js (LTS)
  • Decentraland CLI
  • Vercel CLI
  • Metamask.io Account

Premise

Deploy is the standard method which our work goes through during and after development time. The action of deploying includes different types of deployments which are made depending on the purpose of the deployment.​
​Knowing which deploy you need for each occasion is key for a good feedback flow
How to deploy a scene in Decentraland
​

​Local Deploy

Description

Most common type of deployment for debugging iterations. This deploy is done by turning your local machine into a local server that runs on your browser the Decentraland project you have compiled or exported from Unity. 

​Procedure​

​#00 Installing the Needed Resources
  • Install the LTS version of Node.js (https://nodejs.org/es/)
  • Launch the recently installed Node.js Command Prompt
  • Install the Decentraland SDK (https://docs.decentraland.org/development-guide/installation-guide/) by running the following command:
Code

    
#01 Running your Local Decentraland Folder
​
​
The SDK is installed, now the machine has the resources to understand the folder code and executed.
  • Write a change of directory command with the folder Path you want to execute:
Code

    

  • Run the following command on the folder
​
Code

    
  • The npm/cmd will compile and launch the project on your browser of choice
If you run to see this window just click on "ok"
Picture
et voilà:
Local Deploy Decentraland
​You can run any type of Local Host command as it would happen if you (for example) would like to turn the night mode on or enable Web3 interactions. Just place the parameter at the end of the URL.
Code

    
Vercel Deploy

Vercel Logo

Description

​Vercel allows developers to run remotely local deploys of a Decentraland scene, this means that is possible to share with a client just a link in order to have them test and try out their project without directly deploying in Decentraland. This process is very similar to GitHub Pages and services like AmazonS3. The deploy is also limited by the same rules as a Local Deploy so bear in mind that the platform is not enabled inside the Vercel deploy.

Procedure

#00 Gathering the Needed Resources
  • Install the Vercel CLI from the Node.js command prompt in order to be able to do deploys on the Vercel platform.
Code

    

  • Create the export data that Vercel needs to upload
    • Do so by setting the route to the route to the DecentralandExport folder
Code

    
  • Run the dcl command to create an export from the Decentraland project
Code

    
  • This will create a folder called /export/ inside the Decentraland Project folder.
    • Disclaimer, you need a .dclignore file in the dcl project root. Create an empty .txt and delete the file extension.
#01 Deploying the Folder into the Service
​
  • ​Set the route to the /export/ path you have recently created
Code

    
  • Run the Vercel command in the node/cmd
    ​
Code

    
  • Follow the steps through the process
Code

    
​et voilà:
Vercel Deploy Decentraland - Shark Tank
  • Once the project has been deployed you will see a URL in the node/cmd as a result that resembles something like this:
​Code

    
  • You can run any type of Local Host command as it would happen if you (for example) would like to turn night mode on or enable Web3 interactions. Just place the parameter at the end of the URL.
Code

    

Platform Deploy


Mainnet Platform Deploy Decentraland

Description

Platform deploy is deploying into the final land inside Decentraland. This will make your scene live for everyone to visit and enjoy what you have created. It is also a nice testing area if you are willing to try the real thing with real constrains live. Furthermore is the best way to ensure that everything is working as expected. For these matters you will need to have access to a land through your Metamask account (Operator or Owner rights).

Procedure

First of all, run the start command and make sure that you are not missing any core functionality of your project.
​Code

    
If by any chance your project runs web3 code, double check the server integration is properly done. Run the command that enables web3 during local deploy.
​Code

    
Other parameters to keep into account can be found in "Commands and Executions"
Once everything is in place and working properly, run the deploy command after interrupting the local emulation (CTRL+C).
Code

    
If you have been granted with operator access, just follow the steps, sign through Metamask the deploy upload and that would be all!

Any error or inconvenience happening during deploy will be shown in the command prompt log. By default is following the browser steps.

et Voilà.

Catalyst Deploy


If you want to deploy into the catalyst, just add to the usual deploy command a few arguments that change the target upload.
Code

    

Commands and Executions

Console Project Commands (on Decentraland Project Root directory)

​Code

    
More

Support Docs
​

More about Vercel: https://docs.decentraland.org/development-guide/deploy-to-now/
More about commands: https://docs.decentraland.org/development-guide/preview-scene/
More about CLI/SDK: https://docs.decentraland.org/development-guide/installation-guide/​

URL Runtime Commands (local / browser)

Turn the NightMode ON on local-deploy (on URL).

    
Enable Metamask & Server interactions (on URL)

    
Local Runtime Commands (local / console)
You can add the following flags to the dcl start command to change its behavior:
​
  • -port to assign a specific port to run the scene. Otherwise, it will use whatever port is available.
  • -no-debug Disable the debug panel, that shows a scene and performance stats.
  • -no-browser to prevent the preview from opening a new browser tab.
  • -w or -no-watch to not open watch for filesystem changes and avoid the hot-reload.
  • -c or -ci To run the parcel previewer on a remote unix server.
  • -web3 Connects preview to browser wallet to use the associated avatar and account.
  • -skip-version-checks Avoids checking if the scene’s ECS library version matches your CLI version, and launches the preview anyway.
Browser Console Commands (local-online / browser)
​

- Open the graphic settings 

    
- Enter Build Mode (fly)
Code Editor

    
Note: To preview old scenes that were built for older versions of the SDK, you must set the corresponding version of decentraland-ecs in your project’s package.json file.
Conclusion

Deploy Considerations:
Always consider which deploy suits best the debug purposes and use all the required tools at your disposal to make your project reliable and stable.
Decentraland first basic deploy
Kourtin
​Kourtin
​ENVIRONMENT ARTIST
​I purr when you're not looking. I'm passionate about environments and all the techie stuff to make them look rad. Learning and improving everyday to be a better hooman.
TWITTER
0 Comments



Leave a Reply.

    Categories

    All
    Blender
    CryptoAvatars
    Decentraland
    Decentraland En Español
    Maya
    Metaverse
    Mixamo
    Morphite
    Substance Painter
    The Sandbox
    Totally Reliable Delivery Service
    Unity 3D
    Updates
    Vrchat

    Archives

    March 2022
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    October 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    February 2020
    December 2019
    October 2019
    September 2019
    August 2019
    June 2019
    May 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2016

    Picture
Home
Projects
Assets

Picture
Crypto
Friendly
Picture

Subscribe to get some 💚 in your inbox once in a while.

Follow us and your visit will never be forgotten!
Picture
Picture
Picture

 © 2015-2022 POLYGONAL MIND LTD. ALL RIGHTS RESERVED.
  • Home
  • Metaverse Builder
  • CryptoAvatars
  • MegaCube
  • Blog
  • Decentraland
  • Projects
  • Assets