godotengine / godotengine/godot

Running a project with the CLI without the editor don't update the .godot files

Open
#88,700 4 comments 0 reactions 0 assignees View on GitHub
confirmed enhancement topic:core topic:import
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducible in 4.2, not tested in other

### System information

Ubuntu 22.04

### Issue description

When the `.godot` folder is not up to date and we try to run the project without launching the editor, the `.godot` folder is not updated and it gives errors.

This happens notably when using git versionning and switching branches.

I suppose the normal behavior for godot would be to update this "cache" before running the game.

This is fixed by running the editor once. But isn't very practical in my use case.

### Steps to reproduce

- Setup a project with the editor
- Git commit (commit called A)
- Add some `glb` models in the project and the main scene
- Close the editor
- Git commit (commit called B)
- Git checkout A
- Open the editor
- Close the editor
- Git checkout B
- Run the project with the CLI (without opening the editor)
- Notice errors

### Minimal reproduction project (MRP)

[Test_error_godot.zip](https://github.com/godotengine/godot/files/14383688/Test_error_godot.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the provided Test_error_godot.zip reproduction project and the CLI path used to run a project without opening the editor. Reproduce the branch-switching sequence on Ubuntu 22.04, then compare the .godot folder before and after the CLI run. Done means the project runs without the errors caused by stale .godot data.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.