JCPalmer Posted June 29, 2018 Share Posted June 29, 2018 I have made a form for inputting parameters for webm audio/video recordings. I have broken out the top level StackPanel apart from the full screen AdvancedDynamicTexture. When either the "Rehearse" or "Record" buttons are pressed, you cannot still have the form visible or this happens: Clearly not acceptable to be in the video itself, & a little annoying for rehearsing. The only way I found to temporarily get rid of it was to dispose the texture. After the scene is done, I took the StackPanel and put it in a new AdvancedDynamicTexture, just 2 lines. The buttons are connected to NOTHING now though. Using a Mesh for the texture will allow it to be hidden, but then I need a second camera in ortho mode & setup layer masks. Is there any way to avoid going that route? Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted June 29, 2018 Share Posted June 29, 2018 Hi @JCPalmer If you put it all inside a container, you can simply do container.isVisible = boolean; Example structure; advancedDynamicTexture - BABYLON.GUI.Container - Stackpanel - Other controls JCPalmer 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted June 29, 2018 Author Share Posted June 29, 2018 advancedDynamicTexture does not have a isVisible, but StackPanel does. Will have to see what happens if I hide the top level StackPanel Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted June 29, 2018 Author Share Posted June 29, 2018 Yep, it is completely gone when hiding the StackPanel, and when it is visible again, the buttons still work! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 29, 2018 Share Posted June 29, 2018 We can also play with the layerMask on advancedDynamicTexture and set the value to 0 to hide it advancedDynamicTexture.layer.layerMask = 0; // hide GUI advancedDynamicTexture.layer.layerMask = 1; // show GUI It works well for me JCPalmer 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted July 2, 2018 Author Share Posted July 2, 2018 @dad72, always good to have a number of ways of equal effort. From a tie breaker standpoint, the code reads slightly more straight forward by setting the visibility of the top level StackPanel.. Though I suppose the downside of that is you have to have a top level control. I definitely need one anyway, since I need vertical stacking with some horizontal. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.