You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a Control that will automatically render a thumbnail of a material. To do this, I've created a TextureRectangle to display the thumbnail and a SubViewport to create a simple 3D scene to render the thumbnail. Unfortunately this is causing a lot of problems with Godot being unable to resolve the path to the viewport. I read a few other bug reports I think are related, but the node that is using the SubViewport is a peer of the viewport itself.
Thank you for this fix. I had the same error (and a few related ones). When I removed the assignment from the inspector and instead assigned the ViewportTexture in the parent's ready function, the errors disappeared.
Also, I would love to see the is_ready() function in the PR merged. Despite having is_inside_tree(), I still end up creating my own check for ready a few times per project, and it would be great to have it built-in.
Godot version
v4.0.2.stable.official [7a0977c]
System information
Windows 10, Compatability
Issue description
I'm trying to create a Control that will automatically render a thumbnail of a material. To do this, I've created a TextureRectangle to display the thumbnail and a SubViewport to create a simple 3D scene to render the thumbnail. Unfortunately this is causing a lot of problems with Godot being unable to resolve the path to the viewport. I read a few other bug reports I think are related, but the node that is using the SubViewport is a peer of the viewport itself.
#55818
Steps to reproduce
Try to run this project. You will get these errors when Godot tries to resolve the path.
E 0:00:01:0049 get_node: Node not found: "SubViewport" (relative to "Control").
<C++ Error> Method/function failed. Returning: nullptr
<C++ Source> scene/main/node.cpp:1364 @ get_node()
E 0:00:01:0049 setup_local_to_scene: ViewportTexture: Path to node is invalid.
<C++ Error> Condition "!vpn" is true.
<C++ Source> scene/main/viewport.cpp:76 @ setup_local_to_scene()
Minimal reproduction project
subviewportTrumbnailTest.zip
The text was updated successfully, but these errors were encountered: