How to enable 3D screen after clicking box

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

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):

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:

Thanks :slight_smile:

1 Like