Trigger Unity to re-scan assets and recompile scripts. Use after writing or
modifying .cs files on disk.
Running
cs: below,csis shorthand forpython "$HOME/.unity-cli-plugin/current/cli/cs.py"— one stable path, run verbatim without changing directory. If it's not installed yet, run the unity-cli-setup skill once first.
Recommended (one-step):
python "$HOME/.unity-cli-plugin/current/cli/cs.py" refresh --json --project "$(pwd)" --exit-playmode --wait 120
--exit-playmodeautomatically exits play mode before refreshing if needed--wait TIMEOUTblocks until the refresh + compile + domain-reload cycle completes (default 120s, max 600s)- Domain reload restarts the HTTP service and clears REPL sessions;
--waithandles reconnection
After completion, verify with the unity-cli-status skill if needed.
Manual control (when you need fine-grained steps):
- Check play mode:
python "$HOME/.unity-cli-plugin/current/cli/cs.py" command --json --project "$(pwd)" editor playmode.status
- If
isPlaying: trueand you need to exit first:
python "$HOME/.unity-cli-plugin/current/cli/cs.py" command --json --project "$(pwd)" editor playmode.exit
- Trigger refresh without
--exit-playmode:
python "$HOME/.unity-cli-plugin/current/cli/cs.py" refresh --json --project "$(pwd)" --wait 120