game-ci / unity-orb

Build and test Unity projects for several platforms using CircleCI.
https://circleci.com/developer/orbs/orb/game-ci/unity
MIT License
7 stars 12 forks source link

Allow custom execution method and custom arguments #34

Closed marchewitt closed 1 year ago

marchewitt commented 1 year ago

Describe Request:

I would like the ability to run my own executeMethod instead of needing to use the one set by game-ci

I would also like to be-able to pass custom Env args through the console to the executeMethod

Examples:

Simple example is being able to pass an executeMethod and -executeMethod MyNamespace.BatchMode.Build -buildType=development -version="1.2.3" -bn=123

This then in Unity would go to a build function where we can grab the command args to-do additional work. (Most common is inserting a BN or git hash for our QA to visually validate, buildtype for dev vs release, and sometimes triggering a build with specific scenes for specific debug testing)

namespace MyNamespace{
   public class BatchMode{
      Build(){
         string[] args = Environment.GetCommandLineArgs();
      }
}

Supporting Documentation Links:

From Eric Ribeiro on discord - link

That said, the proper way to do this is to make the executeMethod a parameter in the build job/command. We can do it in a similar fashion of the Builder Action: https://game.ci/docs/github/builder#buildmethod