I have an extension that creates some 2D UI views at startup. These 2D UI views are created using WidgetComponent and UiContainer from omni.kit.xr.scene_view.utils. For some reason, the first time I load the view, the view briefly shows up as a faint gray window and then disappears:
However, if I disable and re-enable the extension, the view shows up just fine:
The issue seems to only be present the first time the view is enabled. Subsequent disabling/enabling appear to work fine. I have tried introducing delays in between creations of 2D views and/or after, and sometimes it seems to work but sometimes it doesn’t. Sometimes, when it works, the faint gray window shows up and then transitions to the actual 2D view. Am I missing something I’m supposed to do at initialization of these scene views?
I am sorry if I misunderstand, but why are you creating new 2D views when we already have them available ? We supply you already with right, front and top. Can you just not use those? The shortcut key in the command is already available
I am not referring to views as in camera angles. I am referring to 2D UI widgets within the 3D scene. I have created several 2D widgets to show information in the scene. If you look at the second video, you’ll see an example widget. I wish to put several of these in the scene, but I encounter the issue shown on the first video.
Took a bit, but I actually got a more understanding of the issue. The 2D widgets are not disappearing. They are simply being positioned at the origin of the scene. This, however, only happens if you activate them when the camera is looking away from them. You can reproduce this issue by doing the following:
If you uncomment the await lines in the setup function and repeat the initial experiment, you will see that only the last 2D Widget gets wrongly positioned in the origin.
This leads me to believe the issue/bug is the following: The last set of 2D widgets to be created, if not within the user’s viewport, will get wrongly positioned at the origin.