The Unity CLI: manage Unity from your terminal
11–20 of 32 posts
Re: The Unity CLI: manage Unity from your terminal
#12> unity command eval runs C# code live inside a running Editor or Player and returns the result, with no project-level recompile or domain reload required. I played around with automating Unity with LLMs for a while. The ability to do this would have been very compelling to me at the beginning. At this point, I think the more productive way for frontier models to interact with a unity project is to directly manipulat…
> I think the more productive way for frontier models to interact with a unity project is to directly manipulate the raw scene files. I disagree. Even moreso than webdev, gamedev benefits from a fast and reliable loop, especially one that can capture realtime state and screenshots. It's the difference between having a new well tested mechanic in your game next morning and giving up after a week of debugging. Agents w…
You can get primitive layouts working if you feed it orthographic projections from the 6 faces, but it falls apart once you need to start looking at things in perspective. It's also absolutely ass at interpreting scene illumination.
We need models trained on 3d scene transforms (aka world models). Passing raster images into the model is a really inefficient method of sending this logical information.
Re: The Unity CLI: manage Unity from your terminal
#13This new unity cli doesn't replace that design, since it's important to me that my core chess variant AI code remains a project on its own, totally independent of unity. But it does mean lots of my utilities like my second unity test, which normally require clicking a button in the editor, can now be run without the editor. Excellent!
Making a 2d chess variant game means almost all unity editor features just get in my way.
Re: The Unity CLI: manage Unity from your terminal
#14What I really want is the ability to do more operations which are decoupled from the editor. Even just being able to reliably type check Unity C# code without a running editor would be great, or running unit tests. Would really improve things like CI as well as the ability to run parallel development sessions.
Re: The Unity CLI: manage Unity from your terminal
#15What I really want is the ability to do more operations which are decoupled from the editor. Even just being able to reliably type check Unity C# code without a running editor would be great, or running unit tests. Would really improve things like CI as well as the ability to run parallel development sessions.
I did that for my Unity games like a decade ago, you can too :) Requires a design that has one core and then using Unity basically as a renderer/viewer though, but is a relatively easy design actually. And yes, automation and DX gets so much easier. I think Captain of Industry is built like this too, remember reading about it here on HN from the developers in some comments.
Re: The Unity CLI: manage Unity from your terminal
#16Re: The Unity CLI: manage Unity from your terminal
#17What I really want is the ability to do more operations which are decoupled from the editor. Even just being able to reliably type check Unity C# code without a running editor would be great, or running unit tests. Would really improve things like CI as well as the ability to run parallel development sessions.
The biggest issue with unity is that the editor (even when headless) is designed to take an exclusive lock over the physical project directory. This can be solved by doing a robocopy of the project to a temporary path, deleting any lock files, and then running headless execution there. You can keep the same temp path(s) over many iterations with incremental sync so it's not copying the entire universe each time.
This works for CI, LLM automation, etc.
Re: The Unity CLI: manage Unity from your terminal
#18Here's the tutorial
https://docs.godotengine.org/en/4.4/tutorials/editor/command...
History is cyclical. Because I remember same situations m$ windows released features years after the same feature in GNU/Linux, or Iphon€ vs android.
Re: The Unity CLI: manage Unity from your terminal
#19I had to struggle for years managing Unity editor installs by hand and then through the headless mode in Hub.
It would be nice if they finally released docker images of the editor so you could more easily spin up build machines too. Oh uh, the AI needs it... yeah. Its for AI.
Re: The Unity CLI: manage Unity from your terminal
#20Well, Godot has the cli from 2016 : https://github.com/godotengine/godot-docs/commits/982ffb6b08... Here's the tutorial https://docs.godotengine.org/en/4.4/tutorials/editor/command... History is cyclical. Because I remember same situations m$ windows released features years after the same feature in GNU/Linux, or Iphon€ vs android.
They're both cli's and Godot was there first, but this isn't really an apples to apples comparison.