playMaker

Author Topic: Prefabs drop after every second build in Unity 2022.3.2f1 LTS (Silicon)  (Read 1436 times)

VVGM

  • Playmaker Newbie
  • *
  • Posts: 9
Hi! I sent this bug report a couple weeks ago via Playmaker's  bug report tool, but didn't get feedback.

So, the problem is... If you use version Unity 2022.3.2f1 LTS Silicon version on mac and playmaker - in this case, after build, whatever iOS, Android, PC, etc - my prefab fields in the inspector become empty. And this is problem because I need this prefabs in my game.
This happens only if game object with prefab script also have FSM component. That's why I write this report here.

This happen with my own c# scripts that doesn't connect with PlayMaker.
But also! This can happen in playmaker's actions as well. For example in "Create Object".

So. How you can get this bug step by step.
1. Create Empty project with Unity 2022.3.2f1 LTS (Silicon) - IDK will it work fine on intel version or no.
2. Import last version of Playmaker via package manager
3. Create empty Game object and call it Object1
4. Create any script and add public or private serialize field that with GameObject type
5. Add new script to object1
6. Create new empty GameObject in Unity and call it as Object2.
7. Make Object2 as prefab.
8. Add new prefab to Object1 script.
9. Make build twice - IDK why but prefabs drop every second build.

pierre nay

  • Playmaker Newbie
  • *
  • Posts: 28
  • we used a vax to render spheres
I am facing the same issue, same version of unity.
« Last Edit: June 28, 2023, 11:45:11 AM by pierre nay »

elvis75k

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 97
    • nRender
Hi, i have the same issue when building for intel-64 bit. Running the Linker Wizard magically fixed the create object action when restarting the project :/

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Hi.
Does those prefabs have fsms with Get/Set Properties actions in it?

pierre nay

  • Playmaker Newbie
  • *
  • Posts: 28
  • we used a vax to render spheres
using call method but pretty much all links are broken (including windows version) this project being migrated from 2021. m reverting back to 2021, the errors are too random, could be anything going wrong.

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
I didn't see this thread before, but I opened up another one in the help forum:

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

Same problem. It's Unity 2022 related. Playmaker seems to clash somehow no matter the version, and it changes the prefab ID. This happens when exporting or when pre-processing the prefabs.

Please fix as Unity 2022 is useless like this.
« Last Edit: July 11, 2023, 10:13:39 PM by Christoph »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
I'm able to repro here. Hopefully can get a fix out asap! Sorry for the inconvenience!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
The problem seems to be with Preprocessing FSMs in 2022. While I track down what has changed, can you try modifying PlayMakerProjectTools with this change:

Code: [Select]
public static void PreprocessPrefabFSMs()
{
        return;

This will bypass the preprocessing for now. The preprocessing is mainly an optimization. The project should run fine without it. Please let me know if this fixes the issues you've been seeing. Thanks!

EDIT: Please import the attached file to see if it fixes the issue.
« Last Edit: July 13, 2023, 04:59:19 PM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Update: This appears to be a new Unity bug in 2022.3. I was able to repro in a new project (without Playmaker) with a super simple example. Preprocessing of prefabs while building seems to sometimes change their Ids. I've submitted the bug report with the project so we'll see what Unity says.

In the meantime, please import the package above that effectively disables pre-processing in 2022.3. I'll also submit an update to the Asset Store to disable preprocessing in 2022.3 until I get some feedback on the bug from Unity or figure out a workaround.

Please let me know if the unitypackage does fix the issue for you. Thanks!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
So the bug is confirmed by Unity. My report was resolved as a duplicate because it was already logged. You can track the issue here: https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-39802

Apparently the bug is fixed in 2022.3.5f1 which should be released July 20th.

My recommendation in the meantime is to either stick with an older version of Unity, try importing the package above, or wait for the Unity update. I'm also investigating the best way to address this in a PlayMaker update (e.g., disabling preprocessing for affected Unity versions.)