Search Unity

Unity does not seem to support several [cloud] projects from same code base.

Discussion in 'Unity Build Automation' started by LOLinc, Jan 24, 2018.

  1. LOLinc

    LOLinc

    Joined:
    Nov 18, 2013
    Posts:
    28
    Hi -

    We have come across what seems to be a limitation to the general Unity services setup. We are trying to think of ways to come around it, so any input would be helpful!

    A little background of our setup: We produce several apps based on the same code-base, using different #scriptingsymbols and pre+post scripts to adjust the build. Through the scripting-symbols we define app/build look, behavior, features to include, and what backend server to communicate with.
    Problem is, we cannot define which unity project the build should be related to. This option is simply not exposed. We would like to have a unique unity [cloud] project for each app to separate live-data (analytics, performance reporting, and remote settings (!)).

    What we have now is Unity [cloud] "project B" producing cloud builds that feeds live-data to Unity [cloud] "project A" because it uses the same project settings file (same code base). This is a fairly big issue for us.

    Any others having this issue or have any thoughts how to work around it?

    Ideally the engine would expose a UnityEditor API that allows us to change the Unity Project ID (the one that the Unity Cloud platform uses).

    We currently apply our custom build settings via 2 hooks:
    - [InitializeOnLoadMethod] when the editor starts - So that we can test in the editor with the same settings as a build would have.
    - Using IPreprocessBuild and implementing the function OnPreprocessBuild(BuildTarget target, string path) - So that when building it also applies the changes right before starting the build process (both local and Unity Cloud Build builds).

    As long as we can call this API during those two engine hooks/callbacks then it should work for us.
    If it needs to authenticate with Unity Cloud before accepting the changes to the Unity Project ID, then having some mechanism for blocking the main thread until we receive a result is great if the engine provides, but I'm sure we could figure that part out ourselves.
    That includes (if needed) authentication credentials for the ID change request - ideally there would be an official way of handling credentials, but again, I'm sure we could figure out a way to store that ourselves if need be.

    Cheers
     
    CaptainKirby likes this.
  2. CaptainKirby

    CaptainKirby

    Joined:
    Dec 12, 2011
    Posts:
    36
    I would like tho hear more about this as well...