playMaker

Author Topic: SetActiveScene Action Bug  (Read 1520 times)

Zeyfon

  • Playmaker Newbie
  • *
  • Posts: 7
SetActiveScene Action Bug
« on: December 24, 2019, 03:06:34 PM »
Hello! I am having an issue with the SetActiveScene action. The problem is that when I try to set a scene active it always send the SceneNotFoundEvent. I previously was doing OK with it, but since I intergrated the Dialogue System from Pixel Crushers I am having this issue, and I don't know what to do.

So, can you help me figure out what is going on? Also what does exactly means the SceneNotFoundEvent. I am using buildIndex for this. So, using this what does exactly tries to do? Does it look for a current loaded scene that is that build index int or what? Because by the time I want the scene to Set to Active that Scene is already loaded.

Thanks in advance for your help.

As extra information I am using Unity 2019.2.14f1, PM 1.9.0.p19 and Dialogue System 2.2.3

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: SetActiveScene Action Bug
« Reply #1 on: December 27, 2019, 05:01:51 AM »
Hi,

well, it's very likely that the project setup was tempered with and the scene you want to activate is not there anymore. check in your build window if the scene is present.

the fact that you integrated a framework and then it started to misbehave would indicate that there is likely a conflict between the logic you had and this dialogue system, maybe it took over the scene management somehow?

Bye,

 Jean

Zeyfon

  • Playmaker Newbie
  • *
  • Posts: 7
Re: SetActiveScene Action Bug
« Reply #2 on: December 27, 2019, 09:42:25 AM »
Thanks for the reply Jean. I know you might be really busy so I will be short.

As an update to this I did some tests.
I put the SetActiveAction in a FSM template and did the RunFSM action instead of it, and it worked well the whole day, but then the next day when I reopened the project the same issue was happening with the FSM template.

For now, my way to bypass this was to attach a Script that does only this action, and in the FSM I call this via the SendMessage action.

This might not be a fix, but is a way to continue with my project.

Thanks for your time Jean.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: SetActiveScene Action Bug
« Reply #3 on: January 07, 2020, 04:24:13 AM »
Hi,

 that's really weird. Maybe this is a racing condition, try to wait one frame ( using nextframeEvent action) before checking this, it might work then reliably.

Bye,

 Jean