Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: PolyMad on May 26, 2021, 07:27:56 PM

Title: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 26, 2021, 07:27:56 PM
I had some problem with a webgl deploy.
I have 2 scenes: the first is just a screen where you click on a button and it loads the main scene.
This was working perfectly on Unity, but once deployed and uploaded to the website, the button didn't work.
There was an error with a sequence where I used a custom transition name, which I made somehow global. Not sure if I made it global, or it transformed by itself somehow.
However, I deleted that transition, and of course in the object I then deleted the FSM that I didn't need anymore.

At this point, it had to work, because no errors were thrown from Playmaker.
But it didn't.

So I checked again.
The global transitions showed a lot of them in use in the first scene, which really aren't. There is absolutely NOTHING in the first scene using global transitions.
So I tried to remove the transition that I was using on the button too, to remake it from scratch.
More problems.
I removed the FINISH transition in the action window, thinking that that would be something local.
But it wasn't: somehow, the FINISH transition ended up as a CUSTOM transition in the window, and I could remove it.
Now FINISH of course is lacking on ALL my FSM and the event browser is mangled as you can see.

Keep in mind that the situation at 03.jpg is in the first scene, where I only have a button to press and only one FINISH transition was used... and it shows all those transitions used... completely effed up.

Please don't tell me I have to remake all today's work... please... I am so near to completion, I can't remake 10h of this...
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 26, 2021, 07:46:47 PM
OK there's an update already.
I closed and reopened Unity.
And it's clear there's something BAD going on with the event manager.

At 00 you can see the event list when just opened Unity, pointing to the first scene.
At 01 I just loaded the second scene.
At 02 I reloaded the first scene.
And at 03 I reloaded the second scene.

On the bright side, I have all my FINISH transitions back, and FINISH is back up in the system events, so I think my project shouldn't be that much compromised, if a fix for the bug is published.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 28, 2021, 08:01:40 AM
So, after restarting Unity, things got a bit better: no more empty line gets created in the events list.
But still, loading scenes affects the number of events used in the scene shown in the event list panel.

Again:
At 00 you can see the event list when just opened Unity, pointing to the first scene.
At 01 I just loaded the second scene.
At 02 I reloaded the first scene.
And at 03 I reloaded the second scene.

Note that in the first scene there is no FSM whatsoever attached to any entity, and the event list panel still shows events being used.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: djaydino on May 28, 2021, 09:20:52 AM
Hi.
Its best to post this in the bug report section.

If you wish i can move this thread there or you can make a new thread
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 28, 2021, 09:38:18 AM
Hi.
Its best to post this in the bug report section.

If you wish i can move this thread there or you can make a new thread

Well I think it's best if you move it!
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: djaydino on May 28, 2021, 09:54:26 AM
Done!
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Fat Pug Studio on May 28, 2021, 10:14:00 AM
Same thing happened to me once, had to redo everything manually.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 28, 2021, 12:01:38 PM
Same thing happened to me once, had to redo everything manually.

Man... no... no... no no no no no  :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'(
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Fat Pug Studio on May 28, 2021, 01:33:42 PM
Same thing happened to me two days ago, i had some local and global transitions that had the same name. All the Despawn global events and local transitions got replaced by Fire globals events and local transitions. I'm fixing stuff for two days already, renaming everything that got screwed up by adding Local and Global to events that share the same name...i guess that's how i'll work in the future.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 28, 2021, 01:57:22 PM
Now I deleted the transition that was in the prefab in the first scene, it showed 3 dots as missing transition.
Replaced with FINISH.
And the result is here... got that blank line popping up again.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Fat Pug Studio on May 28, 2021, 02:43:30 PM
https://hutonggames.com/playmakerforum/index.php?topic=22894.msg100167#msg100167
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Alex Chouls on May 28, 2021, 02:59:53 PM
What version of Unity and PlayMaker are you using?
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 28, 2021, 03:32:29 PM
Playmaker 1.9.1.p5 on Unity 2020.3.9f1.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 28, 2021, 03:41:32 PM
Good news.
Or bad news?
I don't know.
However a new, weird thing just popped up.
You can see in the attached image: when I click on THAT particular point of that state, on the "ll" of Roll, that line pops up.
It's very strange because it does so only on that state and on that particular spot.
I discovered this causally by clicking to move the boxes around.
It only does that on THAT state, on Roll 2 and Roll 1 it's not happening, and nowhere else on any other state of this FSM at least.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 28, 2021, 03:53:12 PM
It's also interesting to note that the number of SHOOT events used should be 0 now.
I deleted all the SHOOT event everywhere, and replaced them with a new ROLL event.
The SHOOT event still show a mistaken 1 use, while ROLL is correctly at 3 in the prefab.
This is the first scene, so there's only a simple FSM loading the next scene, and of course SHOOT is not used anywhere.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 28, 2021, 04:05:25 PM
Additional data.
The main scene shows the use of 51 FINISHED events.
When I open the buttons prefab though, the value increases to 56, but the prefab has at least 12 uses of FINISHED.
The single FSM in the image shows it, and there are other 4 FSM with 3 FINISHED events each.
All these FSM have wrong count of the FINISHED event: ROLL shows 18 but it only has 12, all the other FSM show 5 each, but they are only used 3 times each.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 28, 2021, 04:22:24 PM
I'm thinking: what if I export the prefabs, and import them in a brand new project?
Would Playmaker reset the count?
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Fat Pug Studio on May 29, 2021, 03:07:53 AM
I don't know, my FSM's still count one FINISHED more than there's in the graph.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 29, 2021, 07:51:21 AM
I don't know, my FSM's still count one FINISHED more than there's in the graph.

The real problem here is the behavior of Playmaker in this occasion.
I suspect that problems arise when you delete events from the list, and you can work quietly if you don't touch it.
Don't try to rename or delete events and everything should be fine.
I will proceed this way and see how it goes.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Fat Pug Studio on May 29, 2021, 08:01:55 AM
I need to rename them so the global ones don't clash with local ones. Also, be aware that, while displayed, some gloval events won't be present in events manager, and probably not functional.

(https://i.postimg.cc/FzL9PD9D/screenshot-47.png)

(https://i.postimg.cc/2SmZZBwP/screenshot-48.png)

(https://i.postimg.cc/PfgZd78f/screenshot-48.png)

As you can see, DESPAWN global event is there, but does not appear in the event manager until i click on it again in the send event field.



Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Fat Pug Studio on May 29, 2021, 09:09:11 AM
I keep fixing stuff but i keeps reverting, FIRE keeps getting replaced with DESPAWN and whenever that happens (for example, FIRE is replace with DESPAWN), FIRE global event is LOST FROM EVENT MANAGER!

I even tried replacing those global events with some other, new events, it keeps getting screwed up.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 29, 2021, 01:02:36 PM
I keep fixing stuff but i keeps reverting, FIRE keeps getting replaced with DESPAWN and whenever that happens (for example, FIRE is replace with DESPAWN), FIRE global event is LOST FROM EVENT MANAGER!

I even tried replacing those global events with some other, new events, it keeps getting screwed up.

I think this bug is extremely stupid: probably the loop goes up to the SEMILAST in the list, and not the last.
So in one of the windows (still have to understand which one), when you think you are working on an event, you are actually using another event.
I am pretty sure this is related to a mistaken last number of index somewhere.
That's why you get your events replaced etc.
Shouldn't be too hard to find out... wondering where is Jean when you need him  ;D
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Fat Pug Studio on May 29, 2021, 01:35:36 PM
Well i hope he won't be all like "please file a bug report" since it's already been filed a long time ago.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 29, 2021, 01:43:07 PM
I filed it the day before yesterday... let's see.
This is BAD though. And I don't think this is the first time I met it.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Fat Pug Studio on May 29, 2021, 02:03:31 PM
Very bad, i spent three days fixing it and it is unfixable.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 29, 2021, 03:27:10 PM
Very bad, i spent three days fixing it and it is unfixable.

You may try to prepare a brand new project with Playmaker installed, export all the assets from your original project and import them in the new one.
I think this should work.
And if you won't delete any action, you should be ok.
This is how I'll do.

But let's wait for the dev word...
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Fat Pug Studio on May 30, 2021, 07:28:57 AM
I exported all the prefabs i updated in the screwed up project and imported it in the last backup, works ok now, but i don't need this in my life ever again.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 30, 2021, 09:53:00 AM
Glad it worked!
So the events list now reports correct values?
Of course nobody needs this  ;D
I'm still waiting that the dev sees us...
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Fat Pug Studio on May 30, 2021, 03:40:37 PM
I don't know man, i'm afraid to opet the events tab. When i exported and imported the prefabs into the backup some of them are ok and some needed to be fixed. But i just added proper transitions and didn't delete the old ones from the event manager and it works fine.

For the next project, i'm definitely using different names for global and local transitions and events. While still avoiding global variables like hell, of course.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 30, 2021, 04:42:58 PM
In some cases I really don't know how to not use global variables without flipping the entire project into a mess.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Fat Pug Studio on May 31, 2021, 01:25:45 AM
Just use one global variable, Globals Manager, a game object that will hold all other variables, expose inputs for easier manipulation, then just use getfsmxxx, you get used to it.

(https://i.postimg.cc/y8Mjmcf0/screenshot-55.png)

Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 31, 2021, 03:06:23 AM
But why do this if there are global variables?
I can't really understand.
Global variables are not gigabytes. In most cases they are few bytes. Why not use them?
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: Fat Pug Studio on May 31, 2021, 07:35:31 AM
Type Global Variables in the search and have fun, they're a mess :)

I use them for globals manager and main camera now, and even then they cause trouble by losing reference after a while, so i have to get game object designated as a global and set it to global every now and then.
Title: Re: Problem with system transitions (seems a HEAVY bug)
Post by: PolyMad on May 31, 2021, 08:48:29 AM
Type Global Variables in the search and have fun, they're a mess :)

I use them for globals manager and main camera now, and even then they cause trouble by losing reference after a while, so i have to get game object designated as a global and set it to global every now and then.

This is BAD... thank you for letting me know this... if I'll see some malfunctioning with globals I'll first check this out.