I’m trying to put a new BABYLON.GUI.TextBlock() on a canvas that shares the scene with another canvas. Currently the TextBlock shows up in both canvas; however, I’d like for it to only show up in the one. I’m using the BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI(“UI”, scene) from the following example: https://www.babylonjs-playground.com/#XCPP9Y#346 (the playground example only has one canvas). Is there a way to limit a GUI element to a single canvas? Thanks.
Welcome to the forums!
Ping @Deltakosh or @DarraghBurke
Hi, yes, this should be possible! If you look at the documentation for CreateFullscreenUI()
, it actually mentions this use-case:
You can use layer masks on each camera to determine what gets rendered. Check out this thread for an example of this with GUI: How to make gui disable in DefaultRenderingPipeline? - Questions - Babylon.js (babylonjs.com)
Let me know if you need more help with this!
Hello @Duke_Gard just checking in, was your question answered?