How to realize the effect of 3D screen display after clicking box? (The 3D screen is hidden by default).
Overview | Dashboard | test about the 3d screen | PlayCanvas | 3D HTML5 & WebGL Game Engine
How to realize the effect of 3D screen display after clicking box? (The 3D screen is hidden by default).
Hi @conner,
Take a look at this example on how to add button functionality to any UI element (that works for both 2D and 3D screens):
https://developer.playcanvas.com/en/tutorials/ui-elements-buttons/
From there you can listen to the button click event and act on it by enabling your 3D screen entity:
screenEntity.enabled = true;
Hi @Leonidas ,
Thank you very much for your reply
Can I use script A to control (entity.script.hidden) in script B?PLEASE
Yes, you can communicate between two scripts, check this manual page on how to do that:
https://developer.playcanvas.com/en/user-manual/scripting/communication/
Thanks