playMaker

Author Topic: Variable replaced with other variable  (Read 244 times)

Gua

  • Full Member
  • ***
  • Posts: 248
    • View Profile
    • Andrii Vintsevych
Variable replaced with other variable
« on: February 12, 2021, 04:30:32 AM »
Unity 2018.4.31
v1.9.1.f7p3

Not sure how to reproduce it. Guess something got corrupted after the update.




I had similar issues with other FSMs.

« Last Edit: February 12, 2021, 04:56:20 AM by Gua »

Gua

  • Full Member
  • ***
  • Posts: 248
    • View Profile
    • Andrii Vintsevych
Re: Variable replaced with other variable
« Reply #1 on: February 12, 2021, 05:08:05 AM »

Gua

  • Full Member
  • ***
  • Posts: 248
    • View Profile
    • Andrii Vintsevych
Re: Variable replaced with other variable
« Reply #2 on: February 12, 2021, 05:22:35 AM »
I've tried many different solutions. The only solution that worked. Is deleting all gameobject variables in this FMS, creating new ones and assigning those new variables to actions manually.

Krillan87

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Variable replaced with other variable
« Reply #3 on: February 16, 2021, 05:20:54 AM »
Iv seen that there are other threads about this as well, I thought that it was a rare issue that only I had but i guess that's not the case. Would be amazing if there could be a hotfix to address this!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3776
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Variable replaced with other variable
« Reply #4 on: February 16, 2021, 11:59:17 AM »
Do you have a reliable way to reproduce? Can you try the 1.9.1.p4 beta? It has a fix that might address this, but I'm unable to reproduce here to test it.

Krillan87

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Variable replaced with other variable
« Reply #5 on: February 17, 2021, 03:45:13 AM »
Do you have a reliable way to reproduce? Can you try the 1.9.1.p4 beta? It has a fix that might address this, but I'm unable to reproduce here to test it.

Hi Alex!

I have not a reliable way to reproduce, sadly. But it seems to be connected to prefabs within prefabs, and global variants. It is almost always a global variant that has been swapped out to another global variant. Sometimes it happens when I copy actions inside a prefab, and sometimes it just happens.

I tired the beta but the issue still remains. In the old patch the issue went away when I restarted unity but but it does not fix it any more.

So right now I am stuck. The variable looks good in prefab mode, but when I look at the variable in the editor after, it has magically swapped to another global (It's exactly like if I pressed "edit instance" and changed the variable, except... I have not done that. I even have "confirm editing prefab instances" checked in the settings to avoid have editing a prefab by mistake.
« Last Edit: February 17, 2021, 04:36:40 AM by Krillan87 »

Christoph

  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Variable replaced with other variable
« Reply #6 on: February 22, 2021, 06:41:17 PM »
This is the same issue I have reported before. It happens when you copy actions in prefabs while using global variables inside the prefab. It's easy to reproduce.

Krillan87

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Variable replaced with other variable
« Reply #7 on: February 23, 2021, 05:44:09 AM »
This is the same issue I have reported before. It happens when you copy actions in prefabs while using global variables inside the prefab. It's easy to reproduce.

Okey Wow! I have had a really hard time figuring out when it happens, great to know how I should avoid it thanks for the info mate!

Would be amazing if this bug would be fixed in the near future because it is giving me a lot of headache

Christoph

  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Variable replaced with other variable
« Reply #8 on: February 23, 2021, 11:27:04 AM »
The recommendation is actually to not use global variables at all. I think it is something that has bugged Playmaker for a long time and seems it's not possible to be fixed. But yeah, seems that last update made things even worse.

I have my main template built with global variables which is why I still use them, but I think I won't get around to replace all those with local variables at one point. I think global variables should be blocked completely in Playmaker. That would save new users many headaches. I almost quit Playmaker when I started to run into these issues. It makes Playmaker feel very unstable and overall a bad user experience.

And variables being replaced is annoying but it can go even further with the global variable file getting corrupted. There is another thread on here about this. So make sure to always run backups or even better, use versioning control.

Krillan87

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Variable replaced with other variable
« Reply #9 on: February 23, 2021, 01:34:39 PM »
The recommendation is actually to not use global variables at all. I think it is something that has bugged Playmaker for a long time and seems it's not possible to be fixed. But yeah, seems that last update made things even worse.

I have my main template built with global variables which is why I still use them, but I think I won't get around to replace all those with local variables at one point. I think global variables should be blocked completely in Playmaker. That would save new users many headaches. I almost quit Playmaker when I started to run into these issues. It makes Playmaker feel very unstable and overall a bad user experience.

And variables being replaced is annoying but it can go even further with the global variable file getting corrupted. There is another thread on here about this. So make sure to always run backups or even better, use versioning control.

Yeah we only run 4 globals in the whole project, the 2 main characters and 2 "gamebrains" that keep all the logic between different levels. It saves us a lot of time and hassle to use global for them, but I have also read that they should be avoided as much as possible.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3776
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Variable replaced with other variable
« Reply #10 on: February 23, 2021, 08:13:05 PM »
This is the same issue I have reported before. It happens when you copy actions in prefabs while using global variables inside the prefab. It's easy to reproduce.

I must have missed this! Would love to be able to reproduce this issue reliably.

Are you seeing this in 1.9.1p3? Do you have access to the 1.9.1p4 beta?

Krillan87

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Variable replaced with other variable
« Reply #11 on: February 24, 2021, 05:49:09 AM »
This is the same issue I have reported before. It happens when you copy actions in prefabs while using global variables inside the prefab. It's easy to reproduce.

I must have missed this! Would love to be able to reproduce this issue reliably.

Are you seeing this in 1.9.1p3? Do you have access to the 1.9.1p4 beta?

Even though you did not ask me I can just say that I have the 1.9.1p4 beta and I still have all theses issues.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3776
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Variable replaced with other variable
« Reply #12 on: February 24, 2021, 05:57:06 AM »
Christoph sent me a very useful project. I'm hoping to have a new 1.9.1p4 build with a fix up shortly...

Krillan87

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Variable replaced with other variable
« Reply #13 on: February 24, 2021, 07:07:23 AM »
Christoph sent me a very useful project. I'm hoping to have a new 1.9.1p4 build with a fix up shortly...

Amazing!

Christoph

  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Variable replaced with other variable
« Reply #14 on: February 24, 2021, 11:25:13 AM »
Fingers crossed!  :)