playMaker

Author Topic: Global Variables changing after playing in Unity then stopping  (Read 8203 times)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3639
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Global Variables changing after playing in Unity then stopping
« Reply #15 on: April 01, 2014, 09:05:25 PM »
Can you provide more info? Third party assets? Arraymaker?

If anyone experiencing this problem can log a bug and include a small project with repro steps that would be most helpful!

In the meantime, while we figure this out, a workaround would be to have an FSM that initializes global variables when you press play. Set global variable values in that FSM instead of the globals window.


ben135

  • Playmaker Newbie
  • *
  • Posts: 14
    • View Profile
Re: Global Variables changing after playing in Unity then stopping
« Reply #16 on: April 09, 2014, 12:13:26 PM »
In your mentioned workaround, I tried setting up a state using an action (ex. "Set Float Value") to set a global variable to 0 but when I run the game, the state never uses the action.

Horror

  • Junior Playmaker
  • **
  • Posts: 79
    • View Profile
Re: Global Variables changing after playing in Unity then stopping
« Reply #17 on: July 12, 2014, 08:23:46 PM »
This issue still seems to be lingering. In my experience it only starts happening after updating an existing project to a newer version of PlayMaker. I just updated a project from 2013 to latest Unity + PlayMaker and my globals are no longer resetting after playing in the editor (only happens if the Globals window is active).

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Global Variables changing after playing in Unity then stopping
« Reply #18 on: May 28, 2015, 03:35:27 AM »
2015 unity5 and the problem still exist.

Just spend several hours debugging android to recognize that i have this bug.... :(

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Global Variables changing after playing in Unity then stopping
« Reply #19 on: May 28, 2015, 03:41:43 AM »
Fix: right click in the global var inspector and uncheck "Auto Refresh on Focus"

Just discovered the fix. needs further checking....