Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: wheretheidivides on December 13, 2015, 12:43:51 PM

Title: Errors after upgrading to PM beta
Post by: wheretheidivides on December 13, 2015, 12:43:51 PM
So I did a fresh install of playmaker from the unity store.  Then I upgraded to beta version.  Now I get the following errors.  It says it updated the FSMs and to save.   I do, but after playing the game they pop up again.

Also the UGUI errors are still there from previous version of playmaker.

==========================
FSM Updated: AncientWarrior : FSM Idle
Please re-save the scene/project.
UnityEngine.Debug:LogWarning(Object, Object)
HutongGames.PlayMaker.Fsm:CheckIfDirty() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1001)
HutongGames.PlayMaker.Fsm:InitData() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1266)
HutongGames.PlayMaker.Fsm:Init(MonoBehaviour) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1169)
PlayMakerFSM:Init() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:240)
PlayMakerFSM:Awake() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:202)
======================================
Assets/PlayMaker Custom Actions/uGui/EventSystem/GetLastPointerEventData.cs(221,74): warning CS0618: `UnityEngine.EventSystems.PointerEventData.worldNormal' is obsolete: `Use either pointerCurrentRaycast.worldNormal or pointerPressRaycast.worldNormal'

================================
Assets/PlayMaker Custom Actions/uGui/EventSystem/GetLastPointerEventData.cs(226,76): warning CS0618: `UnityEngine.EventSystems.PointerEventData.worldPosition' is obsolete: `Use either pointerCurrentRaycast.worldPosition or pointerPressRaycast.worldPosition'
Title: Re: Errors after upgrading to PM beta
Post by: jeanfabre on December 13, 2015, 01:14:03 PM
Hi,

 These are not errors, but warnings, coming from the uGui package from the Ecosystem. So you are fine with this, as what it says some properties are obsolete.

 I will be releasing new updates of all them Ecosystem Packages tested and cleaned up for 5.3+.

 For the other warning on CheckIfdirty, have you re saved it, and does it goes away, or is it recurrent even after you saved the scene?

 Bye,

 Jean

Title: Re: Errors after upgrading to PM beta
Post by: Alex Chouls on December 13, 2015, 01:52:04 PM
Unity 5.3 changed the behaviour of EditorUtility.SetDirty. It used to mark the scene as dirty so you'd be asked to save it, and you wouldn't see the update messages next time you loaded the scene. Unity 5.3 no longer marks the scene dirty. I'm looking into whether this is a bug or intended behaviour. Either way we'll have an update to fix this soon...

In the meantime you could make a small change to the scene to mark it dirty (e.g., move an object) then the updated FSMs will be saved when you save the scene.

I'll probably also change the Updated FSM messages to Info instead of Warning, since it's just telling you that the FSM was updated to the the 1.8.0 data format. It's not an error.
Title: Re: Errors after upgrading to PM beta
Post by: wheretheidivides on December 13, 2015, 09:42:18 PM
So what I am hearing is that I have to do something to the game object, then unity will mark it as being changed.  If I don't, then I'll just keep seeing the errors over and over after every time I play the game?  Is this right?

I did try this.  I moved the object, played it, saved the scene, saved the project in several variations.  The console messages still pop up (which is 35 warnings).
Title: Re: Errors after upgrading to PM beta
Post by: Alex Chouls on December 13, 2015, 10:34:22 PM
Please try the latest version in the Asset Store.
It should mark the scene dirty after updating FSMs.
Title: Re: Errors after upgrading to PM beta
Post by: jeanfabre on December 14, 2015, 01:17:12 AM
Hi,

 I confirm on my end that it works now, I can't replicate the issue.

Let us know if it all works for you on your end too wheretheidivides

as for the uGui related warning, they be fixed in the next update, you can safely ignore them until then.

 Bye,

 Jean
Title: Re: Errors after upgrading to PM beta
Post by: wheretheidivides on December 14, 2015, 11:02:49 AM
I just downloaded RC36 from the asset store.  The error warnings are till there.  I moved the game objects then saved the scene and project.  After playing the game they reappear.
Title: Re: Errors after upgrading to PM beta
Post by: Alex Chouls on December 14, 2015, 11:22:45 AM
Is the scene marked dirty (asterix by the scene name)?
Can you confirm the version of PM installed from the Playmaker About Box?
Are the warnings about FSMs in the scene or prefabs or templates in the project?
Title: Re: Errors after upgrading to PM beta
Post by: wheretheidivides on December 14, 2015, 08:05:16 PM
- I am using Unity 5.3 and playmaker 1.8 RC37 now.  (Error messages were not on version 1.7.7.4p2).  The window says its 1.8.0.f37.
- Deleted all of old playmaker stuff (everything).  BTW:  You got to change the folder for the global variables.  I keep deleting it.
-Downloaded RC 37 from asset store.  Installed that version fresh because when I try to upgrade, it gives errors that some scripts are marked as overrides but can not.
- save scene. save project. play game.  errors popup
- move a game object.
- asterick comes up.  Save scene and asterick goes away.
- save project. play game.
-NO ERRORS now.

- errors are on a game object in the hierarchy.  It is a prefab.
===========================
I have 5 projects and this is just 1 of them.  I will clean install RC37 on them and hopefully not delete the global variables folder (which needs to be somewhere else) and let you know.
Title: Re: Errors after upgrading to PM beta
Post by: Alex Chouls on December 14, 2015, 08:09:22 PM
Try getting the latest version again. You should no longer need to move an object to mark the scene dirty. The FSM update should do that automatically.
 
Quote
Installed that version fresh because when I try to upgrade, it gives errors that some scripts are marked as overrides but can not.

Not sure what you mean by this. Can you post the error you see?

EDIT: Yeah I need to figure out a better place to put globals. BTW, you can use PlayMaker > Tools > Export Globals to quickly copy the globals to the root of your project. Or export them in a unitypackage to back them up...
Title: Re: Errors after upgrading to PM beta
Post by: wheretheidivides on December 14, 2015, 08:22:03 PM
OK, I just did this 3 times.  I exported the global variables and they came up in the project window.  I saved the project.  After reloading playmaker, it was gone. It seems as if it deletes the backup global variables or cant find them.  Regardless, they are no longer there after reloading the game.

"Not sure what you mean by this. Can you post the error you see?"
I will but in the meantime it is exactly as I said.  If I have 1.774 and try to upgrade to 1.8, it gives a tons of errors.  It says things were marked as overrides but unity cant do it.  I'll see if I can get these to you.
Title: Re: Errors after upgrading to PM beta
Post by: Alex Chouls on December 14, 2015, 08:34:27 PM
You should be able to copy the exported globals back to PlayMaker\Resources. They need to be in a Resources folder. You might have to re-open the project to reload them. I will be taking another look at this workflow soon, hopefully clean it up a bit...

Quote
It says things were marked as overrides but unity cant do it.  I'll see if I can get these to you.

That would help a lot since I'm not able to reproduce the problem here... the exact error should help us track down the problem...

Title: Re: Errors after upgrading to PM beta
Post by: wheretheidivides on December 14, 2015, 08:59:06 PM
As far as the global variables goes.

- I export the global variables.  they turn up in the project main area.
- I delete everything playmaker but that file.
- I re-load the project.
- The global variables are no longer there.

Now, I tried doing the same thing but did NOT delete playmaker and the global variables is there.  It seems as if you delete playmaker and reload the project, the global variables will no longer be there.

picture 1 shows global variables at the bottom.

I just did this a 4th time and this time the global variables stayed after the reload HOWEVER I did copy them to the desktop first.  Not sure if that did anything.

SUGGESTION:  Have the name of the project in the title of the exported global variables name. That way you can have several in a folder somewhere as backups and know which is which.

======================
Project #2:
     The errors for the FSMs are not there.  Deleted all playmaker stuff, reinstalled.  Now this time the errors stayed until I reloaded the project.  So 2 projects are OK.  I would say 1.8 RC37 fixed the errors.
Title: Re: Errors after upgrading to PM beta
Post by: wheretheidivides on December 14, 2015, 09:12:45 PM
project #3:  Errors no longer there.

OK, I have found out how to get rid of the errors in RC37.

You have to go to playmaker/tool/update all FSMs in build.

If you don't, then you will keep on getting the errors after every time you play the game.
Title: Re: Errors after upgrading to PM beta
Post by: Alex Chouls on December 14, 2015, 09:18:28 PM
Quote
SUGGESTION:  Have the name of the project in the title of the exported global variables name. That way you can have several in a folder somewhere as backups and know which is which.

Good idea.

Quote
project #3:  Errors no longer there.

Good. I also changed these messages from warning to info, since they were never really errors. They were letting you know that an FSM was successfully updated to the latest version.

Quote
You have to go to playmaker/tool/update all FSMs in build.

Interesting. Maybe the problem was with templates or prefabs. I'll look into it...
But yeah Update All FSMs in Build is a good way to update the whole project in one go.
Title: Re: Errors after upgrading to PM beta
Post by: wheretheidivides on December 14, 2015, 09:38:18 PM
Project #4.
No warnings.

I did the same thing as project #3 and got the same results.   You have to update all FSMs in the build to get rid of the warnings.  Otherwise, you get them after playing the game every time.

Project #5
Can't test.  I spent 1.5 years working on this full time and lost the global variables 3 months ago.  Bummer.  there were hundreds of them.  I had to delete off the playmaker stuff to install a new version.  O well.

I'll load in a old 1774 version and upgrade it.  I'll send you the errors.
Title: Re: Errors after upgrading to PM beta
Post by: wheretheidivides on December 14, 2015, 11:11:35 PM
OK, here are errors in the console.  I had 1.772P2 and upgraded to 1.80RC37.  This comes from a project that doesn't have much in it.  There were 53 errors.  I had to delete everything related to playmaker and then reload the project and then install 1.8 RC37 fresh.  Then there were no errors.  If you need the project I can zip and upload.  it's just a demo right now.

Assets/PlayMaker/Actions/SetFsmVariable.cs(98,32): error CS0115: `HutongGames.PlayMaker.Actions.SetFsmVariable.AutoName()' is marked as an override but no suitable method found to override

Assets/PlayMaker/Actions/iTween/iTweenMoveTo.cs(63,38): error CS0115: `HutongGames.PlayMaker.Actions.iTweenMoveTo.OnDrawActionGizmos()' is marked as an override but no suitable method found to override
Title: Re: Errors after upgrading to PM beta
Post by: Alex Chouls on December 15, 2015, 12:04:54 AM
Can you email me the project before you import the update?

From the errors it looks like there are probably duplicate playmaker dlls after updating and Unity is still using the old one, not the new one...

But if I have your project I can see what happens exactly...

Title: Re: Errors after upgrading to PM beta
Post by: Alex Chouls on December 15, 2015, 05:45:53 PM
Thanks for sending me the project.

It turns out the project had duplicate Playmaker dlls from a previous import. This was an import problem with Unity 5.0-5.2. It should be fixed in Unity 5.3.

To fix duplicate Playmaker dlls:
- BACKUP your project
- Delete Assets\Plugins\PlayMaker\PlayMaker.dll
- Rename Assets\Plugins\PlayMaker\PlayMaker 1.dll to PlayMaker.dll

You should then be able to import the 1.8.0 beta.

I'll add this setup problem to the Auto Updater so it can handle this automatically.