godotengine / godotengine/godot

Adding node to SubViewport does not update it correctly in web

Open
#95,294 2 comments 0 reactions 0 assignees View on GitHub
needs testing topic:gui
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducible: 4.2.2 stable, 4.2.1 stable, 4.3-rc3

### System information

macOS 14.5.0 - GLES3 (Compatibility) - Apple M1 Pro - Apple M1 Pro (8 Threads)

### Issue description

I add Sprite2D after timeout to SubViewport through code. It runs correctly on Desktop, but not in browser. In browser after timeout expires nothing happens, then after I leave the tab for some time and come back later the sprite is there.

### Steps to reproduce

1. Open project
2. Run project on desktop
3. Run project in browser
4. Compare results

### Minimal reproduction project (MRP)

[bag_test.zip](https://github.com/user-attachments/files/16552045/bag_test.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached bag_test.zip minimal reproduction and compare the delayed Sprite2D addition to SubViewport on desktop and in the browser. Trace the SubViewport update path for web, reproduce the timeout behavior, and confirm the sprite appears in the browser as it does on desktop.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev, web-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.