playMaker

Author Topic: Playmaker / EZGUI resolution  (Read 2712 times)

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
    • View Profile
Playmaker / EZGUI resolution
« on: May 14, 2012, 09:13:44 PM »
Hey so, I am using Playmaker and EZGUI for an application GUI and all logic.

It's all working, but I am struggling with using Playmaker to scale up/down the EZGUI gui when resolution changes. In my case the GUI is 'pixel perfect' so in fact I want it to always scale to make the gui look sharp on screen.

Anyway, the gui starts perfectly at any resolution but after changing res in-app the gui isn't scaling. EZGUI doesn't know that the resolution has changed.

The producer of EZGUI told me that I need to broadcast a message the GUI components that gets them to update to the new resolution.

I've made a script that contains:

function Update () {
BroadcastMessage("UpdateCamera");
}

After enabling the script, nothing seems to update. I know this isn't specifically a Playmaker issue, but I'm hoping someone else has run into the same problem, as PM and EZGUI are a common combo.

I could use the built in 'call method' on the EZGUI button, but I really know nothing of scripting, and what methods even are.

Thanks for any advice.











Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3632
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Playmaker / EZGUI resolution
« Reply #1 on: May 14, 2012, 09:23:59 PM »
Try using the Send Message action with Delivery set to Broadcast, and Method Name set to UpdateCamera.

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
    • View Profile
Re: Playmaker / EZGUI resolution
« Reply #2 on: May 14, 2012, 09:26:02 PM »
OH! I didn't even realise that the PM broadcast was the same as the 'code version'

trying now

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3632
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Playmaker / EZGUI resolution
« Reply #3 on: May 17, 2012, 01:19:14 PM »
Did that work?

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
    • View Profile
Re: Playmaker / EZGUI resolution
« Reply #4 on: May 17, 2012, 06:13:57 PM »
Hmm, nah doesn't seem to work. What would be the best way to actually enable it? At the moment I have the broadcast message FSM on the root of the GUI, and I enable the FSM when the button is clicked. Nothing changes when updated though.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3632
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Playmaker / EZGUI resolution
« Reply #5 on: May 18, 2012, 05:50:40 PM »
Can you add a Debug.Log to the UpdateCamera method to make sure it's getting called?