How does Economy & Environments work together? How to push values from one environment to the other?

How does Economy and Environments work together?

My initial idea about the usage was that this was some sort of staging for QA and other testing, and production was the live server. However using all these features confused me quite a bit about the use cases of Environments as well as the workflow of Economy.

I created a set of items, (currency. inventory items etc.) and although I have not published them, I was able to pull the values from the server. How is this possible if they are not published? And if they are published the moment I create them, what does "Publish" do?

Can we push changes from one environment to the other? If yes, how?

Another thing that confused us was that we could pull and combine functions and data from two different environments without even setting the environments in the script. Shouldn't we state the environment before pulling data from the server?

Many questions, but I believe they will help others too.

Hi Soleron,

The purpose of environments is to allow you to create Development, Staging and Production environments so you can test things without fear of exposing real players to it inadvertantly or polluting your production data with development tests.

Your post suggests that you may have uncovered some unintentional behaviour.

  • A player shouldn't be able to access un-published items
  • It shouldn't be possible to access multiple environments at the same time

I'll need to dig into this a bit deeper and attempt to reproduce it in order to validate if it is a bug.

The environments functionality is a recent addition to the Beta, so there is still further functionality to roll out. I will pass your comments on promoting changes from one environment to another along to ensure they are being considered.

In the meantime, can you confirm which versions of the UGS packages are in your project by sharing the snippet from your Packages/manifest.json file. Feel free to share your projectId with me by DM if you want me take a look at your environment configuration?

Hey Soleron, about your last question about specification of the environment, there is this in documentation.
So it defaults the production environment, if you dont specify it yourself

1 Like