playMaker

Author Topic: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking  (Read 9722 times)

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #15 on: November 12, 2020, 01:25:40 PM »
Yes, I just saw it appear now when adding a new global variable. Strangely enough, when that gameManager global variable broke, that change didn't get picked up by the versioning software (Sourcetree).

I will pay more attention next time it happens and report back. I'm too scared to experiment with the undo thing djaydino mentioned haha. I don't want to break anything for good. But I will also try not to use undo because it's true, I might have used the undo feature when it broke. So thanks for pointing this out too @djaydino

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #16 on: November 13, 2020, 04:27:20 AM »
Yes, Globals are very sensitive, it's always good to do some export or manual saving of the Globals file, just in case something bad happens.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #17 on: November 13, 2020, 09:18:44 AM »
Hi.
Does your version control include the Playmaker folder?

as it should if its change andsaved.

but what i mostly have is that its gone and when restarting its back.
The change does not seem to save.

same as when i do changes on prefab variants, sometimes the changes are not working when i play the scene that has some prefabs of it.
Then when i restart they work

So i think its something that is not updated correctly in memory on playmaker during the session.

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #18 on: November 14, 2020, 10:02:05 AM »
So I was working on a prefab yesterday (a menu item) and out of reflex I hit UNDO and I was like "fuck me". Seems nothing bad happened so I kept working since I haven't done any versioning for 5 hours because I literally was working on the same feature.

But guess what, my coin prefab once again broke and I just realized until another 5 hours later when I put the game on my device and out of accident played a level and picked a up coin.

Once again, for some reason, my gameManager became deactivated instead of the coin getting deactivated. I checked the coin and everything is setup correctly. So no idea how it can mix up these two.

I deleted the "activate gameobject" action inside the coin and added it again. Now it seems to work again. But I'm sure, the problem is in that Global Variables asset file that somehow got corrupted.

Playmaker should fix this bug. It's critical tbh and makes the entire asset feel super buggy out of nowhere. One might think that after so many years of its existence a bug like that shouldn't exist at all. In my humble opinion this even calls for a hotfix. It shouldn't exist any day longer.

And if it can't get fixed, why not block simply the UNDO shortcut while in prefab mode? Would that be doable?

Is there a way to get an official reply from support directly from Playmaker representative? I honestly would like to know what's their stand regarding this.

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #19 on: November 15, 2020, 06:21:49 AM »
What is your gameManager? It's an object I guess. Was it targeted, somehow, and stored in a Global variable?

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #20 on: November 15, 2020, 09:02:19 PM »
Yes it's a gameobject that manages the game logic of the game like levels, coins, score, etc. And yes, it's stored as a global variable so it can be accessed from everywhere.

The coin does access it for example sending an event to the gameManager so it registers the coin pickup.

Wrensey

  • Playmaker Newbie
  • *
  • Posts: 23
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #21 on: November 25, 2020, 09:07:05 PM »
Just happened to me in 2020.1, saw that a global variable was missing in the dropdown and was doing the duplicating thing in the global variables list. glad I came to this thread again because just closing and reopening unity again seemed to fix it which is nice.

Did give me the reminder to go ahead and connect my project to a GitHub repo

EDIT: nevermind its borked FML
« Last Edit: November 25, 2020, 10:23:08 PM by Wrensey »
Follow me on twitter!

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #22 on: November 26, 2020, 09:53:02 AM »
I encountered a problem similar to this when a global would suddenly be cloned and have two same entries. It's really f***d up things because the right one (the one without the mustache) was returning 0 in the "used by FSMs" count.
Deleting the evil clone solved this but it was hard to decide which one to erase.

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #23 on: November 26, 2020, 10:25:36 PM »
It's crazy that there is no official reply from the Playmaker team about this.

I just came across another bug when working with prefabs. When you re-order actions within a state, the variables used get inverted.



For example in this setup. If I move the "De-Activate Game Object: Best Prize" action to the top and becomes the first action to execute, Playmaker will still use the variable from the previously first action (Chest Closed) in the first action and the setup for these two game objects becomes effectively reversed.

"De-Activate Game Object: Best Prize" will get Activated, while "Activate Game Object: Chest Closed" will get De-activated.

Working with Prefabs is a huge mess in Playmaker.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #24 on: November 27, 2020, 06:00:18 AM »
Hi.
Yeah i have this as well, When changing/moving within (nested)prefabs
But usually when i restart unity after doing changes it is solved.

Also i tend to use variables instead of setting values directly.

There is also a update fsm and prefab preprocess in the playmaker menu that might help.



Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #25 on: November 27, 2020, 01:40:35 PM »
Interesting I didn't know about those settings so I googled them and came across this:



Source: https://hutonggames.fogbugz.com/default.asp?W311

But in the Asset Store this is not available. In Google it says that it was released 6 days ago...

Unfortunately I haven't found what Update, Load and Preprocess FSM/Builds exactly do. I read in this thread https://hutonggames.com/playmakerforum/index.php?topic=22169.0 that building time can become very slow due to prefabs, so I wondered if a lot of FSMs for example can slow down a project or the computer itself as well.

My iMac that has become extremely slow as of late. Actually the mouse (movement) is freezing suddenly and very often almost becoming impossible to work. Do you think this has to do with my Playmaker project? I do not have many prefabs yet in my project but I do already have a few FSMs.

Anyways, I will try to not use global variables at all anymore. At least completely avoid them in prefabs since they seem to be the main issue even with the moving/re-ordering actions. I still think this needs attention from the Playmaker team.


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #26 on: November 28, 2020, 01:12:27 AM »
Hi.
Its Possible that v22 is not yet on the asset store.
When you update an asset unity has to review it 1st and that can take some time (usually 1-2 weeks)

Playmaker can not slow the computer itself.
Also prefab in your project should not slow things down.

But if you have many fsms on an object and have it selected it can slow down due to unity's refresh system.
Also fsm's with a large amount of states can slow down.

You can collapse the fsm's in the inspector to reduce the lag for that.
Also in preferences there are some options that you can set.

But i don't really have issues with mouse going slow/freeze.
What does happen is if writing text or selecting and dragging states / actions that it becomes laggy.

I am sure that Alex is looking into it, but i also think that it not that simple to fix.
Else it would have been fixed already :)

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #27 on: November 28, 2020, 09:27:04 AM »
My iMac that has become extremely slow as of late. Actually the mouse (movement) is freezing suddenly and very often almost becoming impossible to work. Do you think this has to do with my Playmaker project? I do not have many prefabs yet in my project but I do already have a few FSMs.

Could be bloatware or your hard drive disk dying. Also, it's Apple, each update conveniently becomes more power hungry but you are in need of the latest version of the OS to download an up to date XCode version.

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #28 on: December 01, 2020, 10:39:58 AM »
Thanks guys for all the replies.

I'm currently looking with Alex and Jean into the problem. Is there an easy way to setup a demo scene that makes it easy to reproduce the problem?

Since I'm new to Unity/Playmaker I'm not sure how to go about that.

Regarding the computer being slow thanks for taking the Unity/Playmaker possibility out from the possible options list. I also checked my external peripherals and my disk, but haven't found the culprit yet. Will keep digging. :)

Gua

  • Beta Group
  • Sr. Member
  • *
  • Posts: 309
    • Andrii Vintsevych
Re: [SOLVED] Corrupt Global Variables - Disappearing/Unlinking
« Reply #29 on: December 27, 2020, 01:33:50 PM »
I also have this problem. I've just finished relinking some logic to new global variable, because one variable got replaced by another one in all fsms, but then I've spotted, that there's a new duplicate



All try some stuff from this topic to fix it.

Quote from: Christoph link=topic=16254.msg100851#msg100851
[img
https://i.imgur.com/wq4dpjW.png[/img]

Source: https://hutonggames.fogbugz.com/default.asp?W311

For me this page looks like this :(


« Last Edit: December 27, 2020, 01:37:10 PM by Gua »