playMaker

Author Topic: Randomly changing variables in prefabs  (Read 796 times)

RobotGoggles

  • Playmaker Newbie
  • *
  • Posts: 35
Randomly changing variables in prefabs
« on: November 21, 2021, 02:28:32 PM »
I've been using Playmaker off and on for a couple years now, but I'm almost ready to switch to a different system.

Is there any way around the MASSIVE bug that randomly changes variables on prefabs?

I know that I can unpack each prefab and re-create it, but I've been working on my game since February and every time I have to do this it becomes a much larger and more circuitous task. Currently my game is completely broken because random variables change at runtime, and it's far from the first time this has happened.

There must be some solution or workaround here, right?
When life hands you insomnia, make video games.

andyandyandy

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 63
Re: Randomly changing variables in prefabs
« Reply #1 on: November 21, 2021, 06:59:45 PM »
I have the same problem sometimes, is very random. I would make a duplicate prefab just in case until they can solve it. I had this problem for a year now.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7621
    • jinxtergames
Re: Randomly changing variables in prefabs
« Reply #2 on: November 22, 2021, 09:37:31 AM »
Hi.
Which playmaker versions are you using?

On our project we still use 1,9.0 and i have it when i do changes on a prefab.
but when i restart then it works correct.

Something i noticed also is when copy actions and then change variables on them that it uses the old variable, but also fixed when i restart.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7621
    • jinxtergames
Re: Randomly changing variables in prefabs
« Reply #3 on: November 22, 2021, 09:49:13 AM »
also for me it's most of the time (if not every time)
the gameobject variable on a action that gets changed

RobotGoggles

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Randomly changing variables in prefabs
« Reply #4 on: November 22, 2021, 02:16:16 PM »
I'm using Playmaker 1.9.1

Restarting did fix some things (I wish I knew that would work earlier) Unfortunately it really cascaded through the project and it took me all day to clean up. I accidentally referenced a global variable for the UI game object when I meant to reference the global variable for the Player. When I switched it back, every reference in every FSM to either the player or the UI broke at once. (That's a lot)

As you can imagine it took a while to even figure out what happened.
When life hands you insomnia, make video games.

600

  • Moderator
  • Hero Member
  • *****
  • Posts: 715
    • Flashing Lights
Re: Randomly changing variables in prefabs
« Reply #5 on: November 23, 2021, 05:09:44 AM »
I've been using Playmaker off and on for a couple years now, but I'm almost ready to switch to a different system.

Is there any way around the MASSIVE bug that randomly changes variables on prefabs?

I know that I can unpack each prefab and re-create it, but I've been working on my game since February and every time I have to do this it becomes a much larger and more circuitous task. Currently my game is completely broken because random variables change at runtime, and it's far from the first time this has happened.

There must be some solution or workaround here, right?

Could it be similar as this bug? I get these issues after actions are copied to different Data Version
https://hutonggames.com/playmakerforum/index.php?topic=23920.0

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7621
    • jinxtergames
Re: Randomly changing variables in prefabs
« Reply #6 on: November 23, 2021, 12:05:27 PM »
Hi.
@600
In my case not, as the project start with PM 1.8.4+
and i believe that data update was from below this version.

What i noticed when working on a prefab and place a global on a action, then use ctrl-z to undo it can break the global variable connection.
But it also gets fixed when restarting.

its also very important to use version control like github for example, its been a life saver for me many times.
not only for bugs, but reverting changes that i later want to undo or if i want to experiment, then its very easy to revert.