[SOLVED] Two UIs in One scene

I want two separate UIs in a scene. i.e. one separate UI for mobile devices and one separate UI for Desktop devices. these UIs have different background images. Can anybody tell me that how can I make two different UIs in one single scene,

Regards

Hi @Faisal,

You can create two different UI Screen entities, and enable each time the right now (mobile or desktop) based on some rule.

That rule can be the screen width, for example:

const isMobile = this.app.graphicsDevice.width < 640;

this.entityMobileScreen.enabled = isMobile;
this.entityDesktopScreen.enabled = !isMobile;
1 Like

thanks @Leonidas . Issue resolved

1 Like