Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feature Request Cloning stuff from one environment to another to minimise double handling

Discussion in 'Unity Gaming Services General Discussion' started by Brogan89, Jun 9, 2023.

  1. Brogan89

    Brogan89

    Joined:
    Jul 10, 2014
    Posts:
    243
    For example, if I make a cloud code script in a Development environment, I need to copy and paste that same script into the Production and vice verse. This goes for Leaderboards, Matchmaking, and basically everything.

    It would be so handy to have a feature that allows copying stuff from one environment into another, from there overrides can be made.

    It doesn't need to fully mirror and keep track of each change, e.g. a "master" copy with "child" overrides. Or though that would be pretty cool. I think just a straight "copy & paste" from different environments would do a long way and be a great first iteration.

    Currently its pretty painful having to double handle and keep tabs on changes between environments. I'm hoping others will agree with me.
     
  2. joonarahko

    joonarahko

    Unity Technologies

    Joined:
    Jul 9, 2018
    Posts:
    69
    Hey @Brogan89, thanks so much for the suggestion. This is definitely something we identify as a pain point and something we hope to improve.
     
    Brogan89 likes this.
  3. GabKBelmonte

    GabKBelmonte

    Unity Technologies

    Joined:
    Dec 14, 2021
    Posts:
    49
    Hi @Brogan89,

    We actually have 2 live solutions that will help you with CloudCode and RemoteConfig if you use it.

    The first is the DeploymentWIndow: https://docs.unity3d.com/Packages/com.unity.services.deployment@1.0/manual/index.html
    This not only allows you to create and deploy CloudCode JS files straight from the editor, but you have a simple dropdown that allows you to just change environments, and you can then deploy any of the same files to the next environment.

    The second is the CLI : https://services.docs.unity.com/guides/ugs-cli/latest/general/base-commands/deploy/ .

    Not only can you perform the same deployment operations you can in the deployment window, it also allows you to automate them. Additionally, it has access to some of the dashboard's backing APIs, so you can automate other parts of your process.

    As to why this isn't a button in the dashboard, by having the files directly in your repository, you can leverage things like version control (so you can to rollback, if things go south). Your CloudCode can also be versioned with your client code. You can also do diffing and auditing (your peers can review your changes to mitigate things going south), and for things like CloudCode, you can even set up JS unit tests that you can run directly from the editor.

    Additionally, it enables advanced workflows such as "bundling" so you can re-use code from different JS files, which was also an often requested feature, much more easily and intuitively than it could be in the dashboard.

    For more details on the CloudCode part, you can look at this.

    I'm painfully aware this is a problem that should also be covered by other services, but I can say nothing else on the matter at this moment. When I can, I will get back to you !

    Gab
     
    Last edited: Jun 9, 2023
    Brogan89 likes this.
  4. Brogan89

    Brogan89

    Joined:
    Jul 10, 2014
    Posts:
    243
    That's brilliant thanks a lot for those links. The deployment package sounds very useful indeed and having the CloudCode in the same repo as the project. I was wondering about that also.
    I'll look into it.
    Cheers!
     
  5. GabKBelmonte

    GabKBelmonte

    Unity Technologies

    Joined:
    Dec 14, 2021
    Posts:
    49
    Last edited: Aug 3, 2023
    UnityManuJack and Brogan89 like this.