playMaker

Author Topic: Unable to revert Prefabs properly and unexpected variables getting swapped  (Read 1947 times)

agelvik

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 46
Variables get swapped around sometimes in prefabs for some reason.
Prefabs are not getting properly reverted when attempted. Nothing happens when you try use Revert All.

My workaround is to delete existing prefabs in the scene, and place new ones from project folder.
Another workaround is to Edit the parent prefab, delete the actions with wrong values, add new action and insert desired variable again. This updates the prefabs in the scene to correct values.

The Revert bug seems to occur when you Edit prefab FSM instance. After doing so there no way to revert back to default values.
I can't explain how the variables are getting switched around though, it happens when I'm not paying attention. Suddenly action values are containing incorrect variables, as seen in the video.

In the attachment you'll find 2 pictures showing which variable values are correct, and which are wrong.

Video:
https://www.dropbox.com/s/654l8hei12w09kd/prefab_issue_playmaker.mp4?dl=0
« Last Edit: March 08, 2021, 12:13:38 PM by agelvik »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Hi.
on PM 1.9.0x i usually solve it by restarting unity.
something else you can try is PlayMaker/Tools/Update...FSMs
« Last Edit: March 08, 2021, 04:31:06 PM by djaydino »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Are you using the latest version? 1.9.1p4

agelvik

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 46
Sorry, I forgot to mention versions.

I'm using 1.9.0.p20, unity 2020.1.14f1.

I'll update and let you know if it still persists. :)

agelvik

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 46
I've updated to 1.9.1.p4, and sadly I've encountered these bugs again. Revert All seems to still not work & variables are getting swapped around without knowing exactly how.

It could be code from the past that hasn't fully transitioned to the newest version yet, so future Prefabs & Fsms may not have this problem. Either way, this is how things currently are atm for me. Restarting have no effect.

Variable swap: (Left is unknown undesired variable swap, right is default desired values)
https://www.dropbox.com/s/mabknbbqygmdmym/swap-compare.png?dl=0

Revert All:
https://www.dropbox.com/s/8ohcwzso31hftj7/revert-all_notwork.mp4?dl=0


I'll also throw this one in here, since it's kinda related to variables getting swapped around. Again, it's from the previous version, so it may not occur in the future.

On runtime, Run FSM contains wrong input values, it's all swapped around. However in Debug it seems to be correct, so the final results seems to be giving the desired result. Still, it's confusing to see all the input values swapped around.

Video:
https://www.dropbox.com/s/r9mz2zbhjdja8se/run-fsm_incorrect-input-values.mp4?dl=0


Update:
Prefab variable swap partly reproduced. It seems like the row the action is placed at matters. In the video it starts with undesired variable swap, then after duplicating and keeping old actions, the desired variables persist. However when I delete the old actions, the swap reoccurs.

Video:
https://www.dropbox.com/s/s3ved8l95nrhze7/variable-swap-prefab.mp4?dl=0


Update 2
Variables still not updating properly to default values. In this case, I don't even get option to revert or apply changes. This is from a freshly made FSM.

https://www.dropbox.com/s/dvh0v081ncba611/prefab%20variables%20not%20updating%20still.png?dl=0
« Last Edit: March 09, 2021, 11:08:18 AM by agelvik »

agelvik

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 46
Here's an update regarding variables getting swapped around.

By the looks of it, the prefabs with FSMs in the scene can't keep up with actions getting reordered and duplicated, where it overwrite variables based on the action order...

Whatever it might be, I can't quite put it into words. Here's a video reproducing the variable swap from start to finish.

Video:
https://www.dropbox.com/s/ljjn1kz5yfne709/swap-bug_reproduced.mp4?dl=0

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Thanks for the videos! Unity is doing something I don't understand when returning from the prefab stage. For some reason some instance data is not updated. A workaround seems to be restarting Unity, but obviously this is not ideal! I've contacted Unity and hopefully I can figure out the problem with them. Thanks for your patience!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
There's an experimental fix for this issue in the latest beta build.

agelvik

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 46
Was unable to reproduce it in the latest build, seems to be working as intended now!

Apply & Revert prefab instances seems to be more solid as well, it's doing what it's supposed to now. :)

Gua

  • Beta Group
  • Sr. Member
  • *
  • Posts: 309
    • Andrii Vintsevych
There's an experimental fix for this issue in the latest beta build.
Can I get access to that build? This issue created so much pain and suffering, that I willing to install alpha version of next update.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Hi.
You can pm or email your invoice to alex and also your google account (as files are on google drive)

Gua

  • Beta Group
  • Sr. Member
  • *
  • Posts: 309
    • Andrii Vintsevych
Hi.
You can pm or email your invoice to alex and also your google account (as files are on google drive)
Thanks! I've already got invited.