Skip to content

Scene instantiated in another thread breaks NavigationRegion3D #111170

@joelgomes1994

Description

@joelgomes1994

Tested versions

  • Reproducible in: v4.5.stable.official [876b290], v4.6.dev.custom_build [0f3e975] (build from master)
  • Not reproducible in: v4.4.1.stable.official [49a5bc7]

System information

Godot v4.5.stable - Windows 10 (build 19045) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4060 (NVIDIA; 32.0.15.7652) - AMD Ryzen 5 5500 (12 threads) - 15.87 GiB memory

Issue description

I am developing a stage-based game that instantiates each new stage in a separate thread. I noticed that after updating from Godot 4.4 to 4.5, enemy navigation stopped working properly, so I reverted my project back to 4.4.

After some investigation, I discovered that it is possible to fix this with a hack in GDScript by disabling the NavigationRegion3D and re-enabling it some time later, like this:

@onready var navigation_region: NavigationRegion3D = $NavigationRegion3D

## HACK: Disables and enables navigation region after a short delay.
func refresh_navigation_region() -> void:
	navigation_region.enabled = false
	await get_tree().create_timer(1.0).timeout
	navigation_region.enabled = true

Still, I believe this is unintended behavior.

2025-10-02.13-56-49.mp4

Steps to reproduce

  • Instantiate in another thread a scene containing a NavigationRegion3D and NavigationAgent3Ds
  • Add the scene instance to the scene tree

Minimal reproduction project (MRP)

The project is the one shown at the video above. You can enable and disable the said 'hack' I talked about in the level_manager.tscn scene.

test-navigation-spawn.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions