playMaker

Author Topic: Playmaker FSM component references missing [SOLVED]  (Read 3944 times)

Graham

  • Sr. Member
  • ****
  • Posts: 340
  • I Love Playmaker!
    • Portfolio
Playmaker FSM component references missing [SOLVED]
« on: April 03, 2024, 12:17:10 PM »
TLDR: Breakout Pro cannot be exported to a unity package without losing all Playmaker FSM component references.

I updated all of my Playmaker templates on the Asset Store to Unity 2022.3.22 and Playmaker 1.9.8 using the most recent Asset Store Publishing Tools v11.4.0. All of them worked except for Breakout Pro.

Before submission everything was working perfectly, however once the updates went live I started getting support emails about missing scripts on all game objects.

Upon importing my updated Breakout Pro template from the store myself, they are indeed missing practically every single FSM component reference on almost every game object in the project.

It appears as though the Asset Store Tools are stripping Playmaker component script references, but ultimately I don't know if the issue is with Playmaker or Unity seeing as it only affected one of my templates.

I then tried using the Asset Store Uploader to "Export" rather than export and upload as I did before, and the exported Unity package also has this problem right out of the gate. I also tried the standard right click / Export Package and still the same issue. I even tried a custom project export script and the results are the same.

This is a pretty serious issue and I'm hoping to get it figured out as soon as possible.

I emailed you a link to the project so you can see for yourself.

Thanks!
« Last Edit: April 03, 2024, 10:17:55 PM by Graham »
More templates on the Unity Asset Store!

Disclosure: We are using affiliate links to our assets; we may receive a commission for purchases made through them. This helps us to continue developing and maintaining great products!

Graham

  • Sr. Member
  • ****
  • Posts: 340
  • I Love Playmaker!
    • Portfolio
Strangely, if I delete Playmaker from the working shared project and reimport Playmaker from the Asset Store, the references once again break.

This would mean it doesn't have anything to do with the package export process, but perhaps a change in Playmaker?

No files are changed according to my version control, however there is one major difference. Playmaker from the Unity Asset Store does not contain the Assets\Plugins\PlayMaker\WP8 directory.

Upon restoring the WP8 directory all of the script references are restored!

A few of the FSM components are referencing the WebGL\Playmaker.dll as well, which explains why there were a few FSM components left working.

Is there a reason Playmaker no longer includes this DLL?

Why does this particular template rely on it? It's not like I ever had the option to choose from which DLL I created the FSMs with did I? IMO all FSM components should be using the default DLL that is always included with Playmaker.

Seeing as I can't redistribute the WP8\Playmaker.dll with my template, any idea on how I can remedy this?
« Last Edit: April 03, 2024, 01:36:35 PM by Graham »
More templates on the Unity Asset Store!

Disclosure: We are using affiliate links to our assets; we may receive a commission for purchases made through them. This helps us to continue developing and maintaining great products!

600

  • Moderator
  • Hero Member
  • *****
  • Posts: 715
    • Flashing Lights
Hi, not sure if this is the same, but here is my experience.

My assets on store also was getting errors, missing Playmaker components and disconnecting at random. Quick workaround was to import Playmaker1.9.4 on top of current version and then again re-import new Playmaker and it seemed to work, however the Playmaker 1.9.4 is not included in newer PM downloads.
Also when doing this workaround it all worked for me, if the project was exported again without Playmaker, same issues returned.
Then I realized it may be related to FSM data version (seen on bottom of FSM states window), I had to manually create new FSMs, rename as the old ones and copy/paste all contents (for some actions variables broke, so again manually replaced), then all FSM was Data version 2 and working as expected when importing in new projects. It was a pain. But now it works.
There are some Tools included under Playmaker menu, to update data version (iirc) and such, but none of those worked for me, only made worse.

Graham

  • Sr. Member
  • ****
  • Posts: 340
  • I Love Playmaker!
    • Portfolio
Hi, not sure if this is the same, but here is my experience.

My assets on store also was getting errors, missing Playmaker components and disconnecting at random. Quick workaround was to import Playmaker1.9.4 on top of current version and then again re-import new Playmaker and it seemed to work, however the Playmaker 1.9.4 is not included in newer PM downloads.
Also when doing this workaround it all worked for me, if the project was exported again without Playmaker, same issues returned.
Then I realized it may be related to FSM data version (seen on bottom of FSM states window), I had to manually create new FSMs, rename as the old ones and copy/paste all contents (for some actions variables broke, so again manually replaced), then all FSM was Data version 2 and working as expected when importing in new projects. It was a pain. But now it works.
There are some Tools included under Playmaker menu, to update data version (iirc) and such, but none of those worked for me, only made worse.

Thanks for the tips 600. I'll be adding some of these to my notes, as I've had similar issues with most of my assets.

This particular issue I'm facing however is different than any I've faced with my other assets, and I'm pretty certain I've pinpointed it to the fact that almost all of my FSM components are linked to the W8 Playmaker.dll which no longer comes with the newer versions of Playmaker.

I may very well just have to traverse the whole project by hand, linking each instance of Playmaker FSM component to the default Playmaker DLL. I've tested and they do work after doing this, but it'll be a pain in the neck.
More templates on the Unity Asset Store!

Disclosure: We are using affiliate links to our assets; we may receive a commission for purchases made through them. This helps us to continue developing and maintaining great products!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4003
  • Official Playmaker Support
    • LinkedIn
Did you try deleting the old WP8 dll? Unity might find the newer dll with the old dll deleted.

I think there was a bug in a very old version of Unity/Playmaker that caused the WP8 dlls to be referenced instead of the regular dll. I assume your project is quite old?

Instead of going through by hand(!) you could try the attached script. Import and run from the PlayMaker/Utils menu. Backup your project first!

Let me know if this works for you, and I'll look into getting into an update.


Graham

  • Sr. Member
  • ****
  • Posts: 340
  • I Love Playmaker!
    • Portfolio
Did you try deleting the old WP8 dll? Unity might find the newer dll with the old dll deleted.

I think there was a bug in a very old version of Unity/Playmaker that caused the WP8 dlls to be referenced instead of the regular dll. I assume your project is quite old?

Instead of going through by hand(!) you could try the attached script. Import and run from the PlayMaker/Utils menu. Backup your project first!

Let me know if this works for you, and I'll look into getting into an update.

Thanks for getting back to me Alex. Unfortunately I tried this and it doesn't do anything in my project. I tried with the WP8 dll in the project and without, nothing happens when I run it.

There is good news however, I fixed Breakout using a custom script replacer tool I wrote with the help of GPT4. Everything is working flawlessly now!

I've attached the script in case anyone else encounters this issue in the future.
More templates on the Unity Asset Store!

Disclosure: We are using affiliate links to our assets; we may receive a commission for purchases made through them. This helps us to continue developing and maintaining great products!

Graham

  • Sr. Member
  • ****
  • Posts: 340
  • I Love Playmaker!
    • Portfolio
Re: Playmaker FSM component references missing [SOLVED]
« Reply #6 on: April 04, 2024, 06:55:19 AM »
Quick note for anyone wanting to use the tool. The old WP8 PlayMaker.dll needs to still be present in the project for it to work.

Then to use the tool, specify the "Class Name to Replace", and then drag the replacement class from within the PlayMaker.dll into the "Replacement Script" field.
« Last Edit: April 04, 2024, 07:04:59 AM by Graham »
More templates on the Unity Asset Store!

Disclosure: We are using affiliate links to our assets; we may receive a commission for purchases made through them. This helps us to continue developing and maintaining great products!