playMaker

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

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3928
  • Official Playmaker Support
    • LinkedIn
Re: Global Variables changing after playing in Unity then stopping
« Reply #15 on: April 02, 2014, 12:05:25 AM »
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
Re: Global Variables changing after playing in Unity then stopping
« Reply #16 on: April 09, 2014, 03: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
Re: Global Variables changing after playing in Unity then stopping
« Reply #17 on: July 12, 2014, 11: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
    • Grinder Games
Re: Global Variables changing after playing in Unity then stopping
« Reply #18 on: May 28, 2015, 06: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
    • Grinder Games
Re: Global Variables changing after playing in Unity then stopping
« Reply #19 on: May 28, 2015, 06:41:43 AM »
Fix: right click in the global var inspector and uncheck "Auto Refresh on Focus"

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