SubViewport
+ ViewportTexture
doesn't work when created programmatically
#75008
Labels
SubViewport
+ ViewportTexture
doesn't work when created programmatically
#75008
Godot version
v4.0.stable.official [92bee43]
System information
Ubuntu 22.04, GeForce GTX 980
Issue description
Creating a
SubViewport
+ViewportTexture
programmatically doesn't seem to work. The content of the viewport is simply not visible, and there are debugger errors:The message
Viewport Texture must be set to use it
on first glance suggests that this is another manifestation of #66247, but in this case it is not a false error: The issue in #66247 seems to go away when setting the update mode to "always". That's not the case with the issue I'm facing. Also, creating exactly the same scene tree statically in the editor works, which indicates that the issue has rather something to do with creating theSubViewport
+ViewportTexture
programmatically.Steps to reproduce
Simply use a single
Node
as the scene root with this script attached:The example builds this scene tree dynamically:
For comparison I have created another minimal project, where I'm creating exactly the same scene tree statically in the editor:
In this case the
SubViewport
+ViewportTexture
works, i.e., the contents of viewport are visible.Minimal reproduction project
Full minimal reproduction:
The text was updated successfully, but these errors were encountered: