In a 3D project, I’m using a subviewport to display the view from a Camera3D on a 3D surface in the world to create a screen. I need to have a UI overlaid on the screen as well, but I can’t figure out how to actually do this.
Creating any control nodes inside the SubViewport takes me to the 2D editor with nothing visible. Attempting to interact with it causes Godot to show the notification “All selected CanvasItems are either invisible or locked in some way and can’t be transformed.”
This doesn’t seem to do the trick for me. This does make the controls visible but they remain uneditable through anything other than the inspector. Additionally they will display only in the SubViewportContainer’s view, and won’t actually be visible on my ViewportTexture.
I’m bumping this because I’ve been able to figure some things out, but it’s only a partial solution. Turns out that my UI was rendering in the SubViewport but my UVs are just a bit of a mess right now (temp) so it wasn’t actually appearing in-game. That’s my mistake.
However, it is still a problem that trying to edit a Control that’s a child of a SubViewport acts really strange - you can’t see what you’re doing and the editor just throws warnings at you as described in the original post.
The “solution” to this in my case is to split the SubViewport’s UI elements off into an entirely seperate scene. Editing them within that scene will work though it is kind of a pain to have to switch between the UI scene and the 3D scene with the viewport to check changes.
I’m really not sure if any of this is the right way to do it, the way all of this works seems a bit janky at best so I’m left wondering if I’m doing something wrong or if this is an issue/limitation with the editor right now.