playMaker

Author Topic: Issue when compiling  (Read 221 times)

Eriic520

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Issue when compiling
« on: February 25, 2021, 09:57:57 AM »
Hi,

I met a problem when I was trying to compile and export the package from unity.

I was told:

 'More than one global light on layer Hero for light blend style index 0
UnityEditor.PrefabUtility:LoadPrefabContents(String)
HutongGames.PlayMakerEditor.ProjectTools:GetPrefabGameObject(String) (at'

However, actually there's only one global light I'm using on layer Hero.

As it's reported for playmaker, I'm coming here to ask for help. Could you please look at this issue? I really have no idea where I missed. Thank you!


Eriic520

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Issue when compiling
« Reply #1 on: February 25, 2021, 10:00:21 AM »
Adding some details here. The version of playmaker I'm using is 1.9, while the version of my unity is 2019.4.0f1

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5946
    • View Profile
    • jinxtergames
Re: Issue when compiling
« Reply #2 on: February 25, 2021, 12:26:03 PM »
hi.
Can you show a image with the complete message.

the exact playmaker version you can find in PlayMaker/Help/About Playmaker

Eriic520

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Issue when compiling
« Reply #3 on: February 26, 2021, 12:22:33 AM »
Hi, the attached are the scrshots, thx.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5946
    • View Profile
    • jinxtergames
Re: Issue when compiling
« Reply #4 on: February 26, 2021, 05:37:39 AM »
Hi.
was the project updated from a older unity version?

if so did you also update playmaker.

From what i understand this is from a 2d light? which is new since U2019

also is it on a prefab?

Can you try to preprocess before making a build and see if you get errors.
and if so, try if you can click on it and if it targets an object.

If you don't have a backup of you project please make one first and you could try updating playmaker.

Eriic520

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Issue when compiling
« Reply #5 on: February 26, 2021, 07:59:41 AM »
Hi,

Sorry. Providing some more information here:

1) The project was created by Unity 2019.4.0f1 from the very beginning, which is the version we are still using now. I attached the scrshot for this unity version to this reply. Pls kindly check.

2) The error didn't appear when we make a build. It appeared when we try to switch  to iOS platform from Mac/Desktop platform.

We haven't updated playMaker. But will try soon later to see if it solves the problem.

Eriic520

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Issue when compiling
« Reply #6 on: March 01, 2021, 02:55:48 AM »
Hi.
was the project updated from a older unity version?

if so did you also update playmaker.

From what i understand this is from a 2d light? which is new since U2019

also is it on a prefab?

Can you try to preprocess before making a build and see if you get errors.
and if so, try if you can click on it and if it targets an object.

If you don't have a backup of you project please make one first and you could try updating playmaker.

hi,

We've updated our playMaker to 1.9.1.p3 while the error still exists.

The error comes up when we switch unity from Mac/desktop to iOS platform, then click build and run.

Please help.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15443
  • Official Playmaker Support
    • View Profile
Re: Issue when compiling
« Reply #7 on: March 01, 2021, 04:30:50 AM »
Hi,

 it looks like unity got mixed up here, I'll check with Alex to be sure. but I would do the following:

- back up first your project.
- then delete the library folder in your project and reopen it, so that it all gets recompiled from scratch.

- maybe you have updated the lighting package from the package manager... when I google for this, I can't only find references to experimental lighting setup:

https://forum.unity.com/threads/experimental-2d-lights-and-shader-graph-support-in-universal-rp-previously-lwrp.683623/page-10

Bye,

 Jean


Bye,

 Jean

Eriic520

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Issue when compiling
« Reply #8 on: March 01, 2021, 04:50:26 AM »
Hi Jean,

We've found the cause of this issue. But we still have no idea how to fix it. So we still need your help. The followings are what we found:

1) The issue is caused by the 'DoPreprocessPrefabFSMs' method.
2) We have a global light applying to the sorting layer - Hero.
3) We put the player whose sorting layer is Hero in the scene already.
4) When we try to build and run, it seems that playMaker calls the 'DoPreprocessPrefabFSMs' method to generate all the game objects with playmaker applied to them in the scene to check.
5) So therefore, there are 2 players in the scene at the moment, which means there're 2 global lights applying to the same sorting layer with the same blend style.
And then, unity reports this error.

So we're asking if there's a way to fix this problem for our project? It's a bit too complicated to remove the player game object from the scene before game run. We have too many things injected by the player.

Hope there's a certain way. Please let us know. Thank you )

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5946
    • View Profile
    • jinxtergames
Re: Issue when compiling
« Reply #9 on: March 01, 2021, 05:26:53 AM »
HI.
I don't think that the "DoPreprocessPrefabFSMs" opens prefabs witin your scene.
it opens prefabs directly, then add some needed event components and saves.

if you have a back up,
Try to unpack the prefab on the scene, then remove the prefab itself and try to build.

Eriic520

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Issue when compiling
« Reply #10 on: March 01, 2021, 06:23:47 AM »
Hi,

We finally deleted the prefab preset in the scene. And the problem's solved now.

Thank u.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15443
  • Official Playmaker Support
    • View Profile
Re: Issue when compiling
« Reply #11 on: March 04, 2021, 02:43:52 AM »
Hi,

 We'd like to do a repro, can you confirm that this global lighting is for the 2d experimental lighting package?

Bye,

 Jean