godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.38k stars 21.26k forks source link

The NavigationMesh resource is synchronized with the runtime scene only if it is manualy saved from the property dropdown menu #82064

Open Hindi opened 1 year ago

Hindi commented 1 year ago

Godot version

v4.1.1.stable.mono.official [bd6af8e0e]

System information

Godot v4.1.1.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (NVIDIA; 31.0.15.3623) - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)

Issue description

When I create a Navmesh resource file in my project and I assign it in the NavigationRegion3D property, it is properly taken into account in the editor and I can bake the navmesh, but if I try to start the game, the navmesh resource is not synchronized. In the screenshot bellow, the "Visible navigation" Debug option is cheked. image Saving the scene does not help, the only way to have the resource synced is to manualy save it in the propery menu: image

As modifing the property sets the 'unsaved asterisk' on the scene name, I would expect that saving the scene would be enough for the synchronization to work properly.

This may be a well knowed issue, but I couldn't find any open issue related. I'm a new user so... sorry if I missed it.

Steps to reproduce

In an empty project:

Minimal reproduction project

navmeshBug.zip

smix8 commented 1 year ago

As modifing the property sets the 'unsaved asterisk' on the scene name, I would expect that saving the scene would be enough for the synchronization to work properly.

Saving the scene does not help, the only way to have the resource synced is to manualy save it in the propery menu:

I don't think externally saved resources are expected to auto-save when a scene is saved that uses them. They require to be saved deliberately else it would be all too easy to mess up all other scenes that make use of this resource.