playMaker

Author Topic: WebGL: UI doesn't show?!  (Read 3393 times)

nelsonn

  • Playmaker Newbie
  • *
  • Posts: 31
    • check out my portfolio :)
WebGL: UI doesn't show?!
« on: July 06, 2017, 04:21:20 PM »
Hi there,

I just uploaded my little game to itch.io as they support webgl games.
Works nicely except for one thing: my Game Over screen (which consists of a couple of non-editable text boxes) doesn't show.
And because one of the text boxes waits for the player to press a key to restart the game, the game can't be restarted unless you reload the page.

Any ideas? :(

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: WebGL: UI doesn't show?!
« Reply #1 on: July 06, 2017, 10:22:55 PM »
Hi,
There can be several reasons.
It can be showing 'off screen' due to different resolution.
It can be that it is not called for some reason.

What actions are you using to show the gameover screen?

Can you show some images/video of your fsm/states/problem?

nelsonn

  • Playmaker Newbie
  • *
  • Posts: 31
    • check out my portfolio :)
Re: WebGL: UI doesn't show?!
« Reply #2 on: July 07, 2017, 03:48:01 AM »
Resolution should be the same. It's ridiculously small, like 405x300 if I remember correctly.

To show the screen, I only activate the GameObject in the canvas and de-activate the rest of the UI that was there before (just a text box showing the score).

The screen looks like this:


The text boxes are all individual boxes that are children of one GameObject which is itself a child of the Canvas object. Could it be this nested structure that breaks it?

I'm at work atm but I'll upload a shot of the states when I get home.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: WebGL: UI doesn't show?!
« Reply #3 on: July 07, 2017, 05:17:08 AM »
Hi,
Ok.
Can you also tell me what version of playmaker and unity you are using?

nelsonn

  • Playmaker Newbie
  • *
  • Posts: 31
    • check out my portfolio :)
Re: WebGL: UI doesn't show?!
« Reply #4 on: July 09, 2017, 11:07:09 AM »
I managed to fix this myself after looking at the the actions I was using.

Instead of using "Activate Game Object" to show the game over screen, I used "Set Property" to set the text box's Active property. Why did I do that? I have no idea...

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: WebGL: UI doesn't show?!
« Reply #5 on: July 10, 2017, 09:22:42 AM »
Hi,
Indeed you should avoid using "Set Property"
But if you need to use it, then you should also use "Linker Wizard"

Here is a video explaining how to use it :