playMaker

Author Topic: Global Variables Asset file corrupts during Unity update  (Read 109 times)

uk_resistant

  • Playmaker Newbie
  • *
  • Posts: 17
Global Variables Asset file corrupts during Unity update
« on: October 29, 2025, 02:57:25 PM »
Hey folks,

I'm currently trying to update my version of Unity from 2021 to 2023+, as I keep getting a build issue in which the only solution is to update Unity to a version past 2021 (the issue being "sharedassets0.assets' is corrupted! Remove it and launch unity again!")

However, when I do this (or to any version above 2023), something happens to the Global variables asset file which makes it seem like Playmaker doesn't recognize it and this causes my prefabs to have no reference to the variables.

It looks like they don't exist and this in turn causes "missing script" components to appear on objects. When I open a prefab it lists no global variables either in the bespoke list or when assigning them to an action.

I have tried (mostly by looking at other posts dealing with similar problems

-Updating Playmaker + Editor
-Not updating playmaker but updating the editor
-deleting the library and reimporting
-reimporting everything
-exporting the global variable asset file from an earlier commit version and reimporting into a newer commit
-Straight up replacing the asset file with an older one from outside the project
-"recreating" the global variables in the prefab so they link and reappear (as suggested in another thread) .
-closing and re-opening the editor.

I'm at a real loss and I don't know what to do as I have waaayyyy too many Global variables to recreate and hope they link (It was a early project and the tech debt is too much!)
I can only assume that the way asset files are formatted/read is different in older versions? But honestly, I don't know.
I should note that this isn't a new project, and I have already released it on Steam. I'm actually attempting an update to the game.


The versions of everything are

Unity 2021.3.45f2
Unity 6000.1.15F1

Playmaker version
Pre-Unity update - 1.9.4
I also tried updating to latest.


Threads I have referenced:

https://hutonggames.com/playmakerforum/index.php?topic=11613.0

https://hutonggames.com/playmakerforum/index.php?topic=1117.0


Any help anyone can offer would be very useful and very much appreciated.

Thanks

Jamie D




EDIT:
After updating to 2023, this is what the inspector looks like on the Global variable asset. I have no idea what script should go there?

« Last Edit: October 29, 2025, 03:26:09 PM by uk_resistant »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4251
  • Official Playmaker Support
    • LinkedIn
Re: Global Variables Asset file corrupts during Unity update
« Reply #1 on: October 30, 2025, 12:53:41 AM »
Are there any errors in the console? Normally if a script is missing it's because another error in the project stopped it from compiling (it can be an unrelated error that still stops other scripts from loading).

uk_resistant

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Global Variables Asset file corrupts during Unity update
« Reply #2 on: October 30, 2025, 07:27:43 AM »
Hi Alex,


appreciate the reply!
The console doesnt have any compile errors (though there are a couple of yellow warnings) so I dont think it is this.

Just to clarify my issue further;

This is the Playmaker global variable asset as it stands:


When I open the global variables list within Playmaker, I get nothing. If I created a new one, I get this dialog box , implying that Playmaker thinks that no globals exist.




After this, if I check the playmaker global assets file in Unity, it has the correct Icon and behaves as youd expect but with none of my variables.




I should note that I have tried importing the variables using the playmaker import tool but it just throws errors and says there are no variables contained.


Any ideas?


EDIT:

The post below seems like a similar issue but I am not sure what the correct script to apply is? If I knew that, maybe that will get me on my way

https://hutonggames.com/playmakerforum/index.php?topic=26004.0
« Last Edit: October 30, 2025, 09:47:32 AM by uk_resistant »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4251
  • Official Playmaker Support
    • LinkedIn
Re: Global Variables Asset file corrupts during Unity update
« Reply #3 on: October 30, 2025, 11:41:53 AM »
The script name is PlayMakerGlobals.

It looks like maybe some file ids got corrupted. You could try opening the old and new (empty) globals assets in a text editor and look near the top for something like file ids (sorry, not at my computer to double check) and copy the id from the new file to the old file.

Obviously only attempt this in a copy of the project!

uk_resistant

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Global Variables Asset file corrupts during Unity update
« Reply #4 on: October 30, 2025, 01:11:26 PM »
Hi Alex,


I have opened up the old and new files as you say and I cant see an ID per say but certainly can see some info about what version of Unity the file was created in.

I have tried some cut and paste but to no success (i get an error message about the file being serialized in an older version of unity), though when I open up the file, it is hard to read:




When you get a chance, if you could point out where I might find the info you speak of, that would be great.

(Appreciate your effort already!)

EDIT: I tried assigning the PlayMakerGlobals .dll  to the gloabl asset file but nothing seems to happen and when I click off it, the asset resets to just having a missing mono script

« Last Edit: October 30, 2025, 01:14:10 PM by uk_resistant »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4251
  • Official Playmaker Support
    • LinkedIn
Re: Global Variables Asset file corrupts during Unity update
« Reply #5 on: October 30, 2025, 01:21:36 PM »
It looks like your project is saving the asset in binary format. Look in project settings for asset serialization and select force text. This should save a file that is more readable.