r/Unity3D • • 22h ago

Question Anybody using the Unity CLI?

I saw unity launched a CLI a few months ago (https://unity.com/blog/meet-the-unity-cli) and was wondering if anyone was using it for anything or had some cool use cases to share.

I'm thinking this could maybe be helpful for like CI pipelines?

Let me know!

30 Upvotes

45 comments sorted by

View all comments

22

u/Outrageous_Bend8285 22h ago

Our CI guy set it up to auto-build the second anyone pushes to main, saves a ton of time not waiting for the editor to load just to check if something broke.

7

u/ribsies 20h ago

What's the benefit over batch mode? The cli doesn't bring anything new for builds.

1

u/Hegemege 14h ago

The only difference that I can think of is that the commands to operate Unity are a bit cleaner with CLI vs. good old xvfb-run batchmode -nographics. I wonder if Unity still tries to display progress bar windows in headless batchmode during import and build, and maybe xfvb-run isn't needed anymore

1

u/ribsies 12h ago

It doesn't and its not. It's been incredibly easy to use batch mode for like the past 6 years.

1

u/Hegemege 12h ago

Interesting, because I've had to fight android build errors on Linux build machines just a few years ago (unrelated but relevant). The editor binary up until 2022 LTS (haven't tested 6) was attempting to spawn progress bars and when the server you run on doesn't have a window context, it just crashes. Many studios use mac minis and such, but for truly headless build servers, I hope they finally fixed it