Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Zeb on September 16, 2017, 04:44:50 AM

Title: All Local Events Spontaneously Became Global Events
Post by: Zeb on September 16, 2017, 04:44:50 AM
Greetings.

I had a surprise today when working in Unity and PlayMaker… out of nowhere I noticed all of my local events had been changed into global events. So, now I have this massive list of events in my global list from Unity which is super annoying. I tried to revert the ones I knew were local events in the Global Event window but it won’t let me change anything in that menu. I went through and spent 45 minutes manually changing every local event I could find back to local.

Then the moment I wanted to burn Unity to the ground was when I realized all of that work may have unchecked the global event box in PlayMaker but Unity still has every single one of those events listed in the global events list. Incredibly frustrating.

Anyone know how I can clean up this list and get my project back in order? Also, anyone have a clue as to how this could happen in the first place?

Thank you,
Zeb
Title: Re: All Local Events Spontaneously Became Global Events
Post by: djaydino on September 16, 2017, 08:31:28 AM
Hi,
1st thing, make a backup of your project

What unity and playmaker version are you using,
Can you show in a video from the issue? (showing fsm/state/variables)

in the playmaker editor window on the Variables tab you can right-click on the global variables to place local variables (if they are removed from the local variables)
this will not remove the global tho. you can remove them in the globals window

For the events, to remove them from the globals, you can open the event window (goto Playmaker/Editor Windows/)

you can remove the events there, but it will also remove from the local fsms.


One thing you could try if you don't have many "original" globals is to remove the file : Playmaker/Resources/PlaymakerGlobals
before you try this make a backup of your project
after removing you need to restart the project.
Title: Re: All Local Events Spontaneously Became Global Events
Post by: Zeb on September 16, 2017, 04:38:07 PM
Thanks for the support Djaydino.

My Unity version is 2017.1.0f3 and PlayMaker is 1.8.4. To be clear this is only with events. Variables seem fine for now.

There are far too many events in this project to remove and replace them at this time. I’m feature complete and there are hundreds of events throughout the project. I did use a naming convention between global and locals so all local events are lowercase and globals start with an uppercase.

I’ve attached a couple of videos showing what happened as a result of this. First, you’ll see the capitalized events which are supposed to be Global. Then as I scroll down the list you’ll see all of the lowercase local events marked as Global in the list as well. And I’m unable to uncheck them as globals here. This would have been the quick fix I was looking for but no deal.

The second video shows the impact of this when I try to select a Global Event from the list. My list is now full of local events that I have to sift through.

It’s not the end of the world so I’ll manage but I’m really curious if this is a known issue or a usability one… like there is some hotkey that turns everything to global? Just want to know how to avoid in the future.
Title: Re: All Local Events Spontaneously Became Global Events
Post by: djaydino on September 17, 2017, 12:16:50 AM
Hi,

i never seen a case like this yet and i don't think there is some kind of shortcut button.

Try this :
In the events you can right click on the Events to see where they are (in which fsm)
and you can select them, then in the fsm uncheck the global

Also can you send a bug report inside unity (goto Playmaker/Tools/Submit Bug Report) and add a link to this thread.

For in the future, i would recommend to back up regularly (daily and on big changes)
Unity, playmaker and any other asset can have bugs, also if you make mistakes it is easier to revert to an older version.
And if you want to experiment it is also good to have backups.

You can use for example Sourcetree / Github.

Quote
I did use a naming convention between global and locals so all local events are lowercase and globals start with an uppercase.
This might actually have triggered the issue.
try naming Globals and Locals differently.
You can for example use this :
global : _MyVariable
Local  : MyVariable

Also if you use addons like (for example) Easy Save. use different tag names (for example TAG_MyVariable)
Title: Re: All Local Events Spontaneously Became Global Events
Post by: Zeb on September 17, 2017, 12:31:20 AM
I'll put in a bug as you suggested. On the note for backups I actually use Unity Collaborate and check in several times a day. I also use Git for asset backups.

However, in this case I had gone several hours without a checkin and noticed the global events issue.

Its totally on me for not checking in my work that day. I could have reverted but in this case I didn't want to lose the work I did and am now having to deal with this mess.

Thanks again for your support.

Zeb
Title: Re: All Local Events Spontaneously Became Global Events
Post by: jeanfabre on September 18, 2017, 02:30:28 AM
Hi,

 uhm, Maybe Unity Collabortate is playing funny with PlayMaker...

 Bye,

 Jean
Title: Re: All Local Events Spontaneously Became Global Events
Post by: Zeb on September 18, 2017, 02:41:18 AM
I think that's a good assumption Jean. I'll keep an eye on my checkins and see if I can catch it red-handed.

Zeb
Title: Re: All Local Events Spontaneously Became Global Events
Post by: djaydino on September 18, 2017, 12:02:30 PM
Hi,
That's indeed possible.
I had some issues with a client, when colaborating.
it duplicated several states.

@ jean i will try to setup a colaborate project for testing in the next few days.
Title: Re: All Local Events Spontaneously Became Global Events
Post by: jeanfabre on September 19, 2017, 02:13:53 AM
Hi,

 yes please :)

 Bye

 Jean