Bug Reporting > PlayMaker Bug Reporting

[SOLVED] Corrupt Global Variables - Disappearing/Unlinking

(1/7) > >>

craigz:
Hi!

I keep having Global Variables deleting themselves and breaking their connections to FSM's. It's been getting super frustrating and I'm not sure what to do. Each time it happens I lose hours of work  :-\

Without really knowing how things are working, my only guess is that my Gameobject Global Variables section is corrupt somehow?

The variables that get disconnected don't show up in my Global Variables inspector preview OR the window. But they DO show up in the actual file If I crack it open.

Things to note:
1. First time this happened was with the 'game_game_manager' variable, which I now realize I have two of in my globals for some reason?



2. The variable I'm currently missing is 'game_unit_manager' which shows up in the actual globals file still, but not in the globals inspector preview or the playmaker globals window.





3. In the inspector preview of the globals, there's a floating/unassigned game object variable at the top, seems out of place, could possibly be contributing to the error?




I would just really appreciate some help with this. Been beyond frustrating ><

-craigz

craigz:
Alrighty :) spent a day figuring this one out.

At some point within the past 3 or 4 versions of Playmaker I believe my global variables got corrupted. I specifically remember it happening around the time categories became a thing.

The issue was that when making a new global variable, it would delete one that was made prior, unlinking it from anything that was referencing it.

Here's what I did to fix it:

1. Open up your PlayMakerGlobals.asset file in mono.

2. Go to the variable header of the type of variable that was deleted. For instance, mine was a gameobject, so I scrolled to here ->



3. Go through line by line and see if you have any duplicate variables. It would look something like this ->



4. Delete BOTH variables sections. I've highlighted what it should look like in red.



5. Save the file. Exit out of the Global Variables window if you have that open. Then close Unity.

6. Open Unity again, open the PlayMakerGlobals.asset file again and do a ctrl+f to search for the variable to make sure it's not in there.

7. Open your globals variables window, create the variable again.

8. Go through your Error Check window and go ahead and put in that new variable you created.

***If your variables keep appearing in the PlayMakerGlobals asset file even after you delete them, delete them again, and delete all your categories from the file. Just scroll down til you find the area between Global Variables and Events. Or do a quick search ctrl+f for 'category'. Delete all the dashed categories and the category ID's (but be sure to leave a single dash under categories). Make it look like this ->




After that, close Unity, open it back up and you should be all good to go!

I hope no one else has to put up with this problem. Cheers to a bug-free PlayMaker 2.0!

-craigz

jeanfabre:
Hi,

 thanks for this. I pinged Alex on this, maybe there is something we can do internally to check for these duplicates and correct it. We'll see.

Bye,

 Jean

craigz:
Excellent, great to hear Jean, thank you :)

Wish I had an exact version for when I think the problem originated for you guys, hopefully it was just a legacy issue for me. Saw a couple other people on the forum with it so just wanted to make sure the information was on the internet somewhere ;)

jeanfabre:
Hi,

 yes, that's the spirit, thanks for contributing in the knowledge, it means a lot to us :)

 Bye,

 Jean

Navigation

[0] Message Index

[#] Next page

Go to full version