Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: Raptcha911 on February 06, 2016, 12:09:58 AM

Title: Changes to PM are not saved all the time
Post by: Raptcha911 on February 06, 2016, 12:09:58 AM
Hi,
I'm having this very weird and frustrating issue while using playmaker. When I make changes to PM (like adding states and changing values), the changes wont be there the next time I open the project.. And the frustrating part is that this does not happen everytime, only sometimes..making changes to the FSMs doesnt bring up the asterisk in Unity, so I've made a habit of manually saving the changes everytime.. As I'm typing, I'm seeing that none of the changes I made to the project yesterday were saved.. I, just now, tried testing this problem by making changes and exiting without manually saving and it works (the changes are saved).. this problem occurs only sometimes.. I'm not sure under what circumstances..Am I the only one with this issue??
Title: Re: Changes to PM are not saved all the time
Post by: Alex Chouls on February 06, 2016, 12:15:46 AM
If you're using Unity 5.3 make sure you're using Playmaker 1.8.
Title: Re: Changes to PM are not saved all the time
Post by: playsteven on February 07, 2016, 05:55:43 AM
Hi,

I believe I am having the same issue, with changes not saving. I am using Unity v5.3.2p2 and the latest Playmaker v1.8.

Yesterday, I changed values in my actions and today they are reverting to the previous values of them. I am manually saving the scene and project.

This happened a few days ago too, but I wrote it off as a Dropbox sync issue - but this time the project isn't on Dropbox.

I can replicate this in a blank project...

I add an action Set String Value, setting my string "test" as "Hello1".

I save scene and project and exit.

I reopen the project and update the value "Hello1" to "Hello2".

I save scene and project (although there is no asterisk in the title bar to suggest there is a change to save) and exit the project.

Close the project, reopen it and "Hello1" is still there.

No matter how many times I change it, the change is never saved.

Here's the workaround ...

I open the project, change "Hello1" to "Hello2", and add another Set String Value or any other action (I think) which I can then delete. There is now an asterisk in the title bar. I save and close the project.

I reopen the project and "Hello2" has now saved properly.

Changed values don't seem to save if this is the only thing you do before saving.

I really hope that this helps!

Cheers,
Steven


Title: Re: Changes to PM are not saved all the time
Post by: Alex Chouls on February 07, 2016, 12:14:01 PM
I'll look into this - though I generally don't use Unity patch releases. In my experience they tend to break more than they fix. Do you have the same issues with the official 5.3.2 release?

EDIT: Ok, I'm able to repro in 5.3.2. A workaround is to make another change to the scene to mark it dirty. But hopefully we should have a fix soon...
Title: Re: Changes to PM are not saved all the time
Post by: playsteven on February 07, 2016, 01:01:23 PM
Thanks, Alex, as always  :D
Title: Re: Changes to PM are not saved all the time
Post by: Alex Chouls on February 07, 2016, 04:48:02 PM
There's an update the Asset Store and our store that should fix this issue.
Import the latest version and install 1.8.0 from the Welcome Screen.
You should have version: 1.8.0.f42

Please let me know if you run into any problems with the update...

Title: Re: Changes to PM are not saved all the time
Post by: playsteven on February 08, 2016, 05:41:18 AM
Works great, Alex, thank you!
Title: Re: Changes to PM are not saved all the time
Post by: Raptcha911 on February 08, 2016, 07:57:36 AM
Wow, really glad its fixed!!.. Thanks playstevens for elaborating on the problem.. It was the same problem I was facing.. And thanks Alex for the quick fix.. Cheers!!
Title: Re: Changes to PM are not saved all the time
Post by: playsteven on February 08, 2016, 09:29:57 AM
I think there's still an issue. Raptcha911, would you mind testing this as well?

I've got a Float Interpolate action. If I change Time to a different value, then play the scene, the warning below appears, and the value isn't changed.

PlayMaker: Unhandled SetDirty: Missing Owner
UnityEngine.Debug:LogWarning(Object)
HutongGames.PlayMakerEditor.FsmEditor:SetFsmDirty(Fsm, Boolean, Boolean, Boolean) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditor.cs:1661)
HutongGames.PlayMakerEditor.FsmEditor:SaveActions(FsmState, Boolean) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditor.cs:1567)
HutongGames.PlayMakerEditor.StateInspector:Update() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/StateInspector.cs:137)
HutongGames.PlayMakerEditor.InspectorPanel:Update() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/InspectorPanel.cs:90)
HutongGames.PlayMakerEditor.FsmEditor:Update() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditor.cs:790)
HutongGames.PlayMakerEditor.FsmEditorWindow:Update() (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:350)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Title: Re: Changes to PM are not saved all the time
Post by: Alex Chouls on February 08, 2016, 12:20:48 PM
Is the action on a prefab or a prefab instance?
You get the warning when you press play?
Title: Re: Changes to PM are not saved all the time
Post by: playsteven on February 08, 2016, 02:57:25 PM
I was getting the error when pressing play. Sorry, I don't know the difference between a Prefab and a Prefab Instance.

I'm working to a deadline currently, but when I get some time I'll try to replicate in a blank project.
Title: Re: Changes to PM are not saved all the time
Post by: Alex Chouls on February 08, 2016, 04:28:28 PM
Thanks, I'm playing around with it and cannot get the error...

I call the asset in the project view a Prefab, and the instance in the scene a Prefab Instance. The code paths to edit Prefabs and Prefab Instances is slightly different than for regular scene objects. So it helps to know what type of object throws the error, to help reproduce it and track down the problem.
Title: Re: Changes to PM are not saved all the time
Post by: playsteven on February 09, 2016, 06:06:14 AM
Got the chance to test on Unity v5.3.2, and now we'll see how little I understand the programming terms to use :) I've published a game. I'm embarrassed.

This is a blank project, with only PlayMaker installed.

Under the Main Camera, I create Empty (is this an object?) and then create an FSM on this.

Adding a Float Interpolate action, fill in some values, press play then stop it.

Change the value of From Float from say, 2 to 3, and get the SetDirty: Missing Owner message I mentioned previously.

If I then press play and stop, if I return to the action the value has been reset to 2.

Alex, I hope you can make sense of my nonsense and it helps :)
Title: Re: Changes to PM are not saved all the time
Post by: Alex Chouls on February 09, 2016, 01:11:47 PM
Can you confirm in PlayMaker > About that you have 1.8.0.f42 installed?
Also are you Mac or PC?
Title: Re: Changes to PM are not saved all the time
Post by: playsteven on February 09, 2016, 03:08:06 PM
1.8.0.f42 on PC.

I know what causes the problem now :)

I had the PlayMaker tab next to the Scene and Game tab. When I pressed play, I can only presume the switch from PlayMaker to Game in the window caused the error.

I'll just have to change to a different layout, but it might help somebody else if they have a similar issue.
Title: Re: Changes to PM are not saved all the time
Post by: Alex Chouls on February 09, 2016, 03:14:50 PM
Ahhh, that makes sense. The editor delays committing some edits to improve editor performance and this is an edge case where maybe edits aren't commited... I'll look into how we can handle this... Thanks for the repro steps.
Title: Re: Changes to PM are not saved all the time
Post by: playsteven on February 09, 2016, 03:16:17 PM
You are welcome. Thanks for your help.
Title: Re: Changes to PM are not saved all the time
Post by: Alex Chouls on February 09, 2016, 03:31:33 PM
Hmmm strange, I can't repro here.

Can you submit a bug report when you have a chance (Playmaker > Tools > Submit Bug Report) so I can get more system info.
Title: Re: Changes to PM are not saved all the time
Post by: playsteven on February 09, 2016, 03:36:41 PM
Done. Can you PM an email address so I can send you an image of a screenshot of my Unity layout?
Title: Re: Changes to PM are not saved all the time
Post by: playsteven on February 09, 2016, 03:39:47 PM
Sorry, idiot moment, screenshot attached :)
Title: Re: Changes to PM are not saved all the time
Post by: Raptcha911 on February 11, 2016, 10:15:05 AM
Hey, I still have the same issue.. I just updated playmaker frm the assetstore.. Actually I'm not sure if it got updated, bcoz I dint see the update button.. It downloaded the package and imported it again.. And while importing all the files were greyed out except for some sprites.. I'm not sure how to update..

But the problem is still there.. All the changes are reverted back once I CLose and Open it again..
Title: Re: Changes to PM are not saved all the time
Post by: Raptcha911 on February 11, 2016, 10:20:23 AM
My version number in playmaker is still 1.7.8.3p2...
Title: Re: Changes to PM are not saved all the time
Post by: Alex Chouls on February 11, 2016, 12:51:31 PM
You have to install 1.8.0 from the Welcome Screen.
Title: Re: Changes to PM are not saved all the time
Post by: Raptcha911 on February 11, 2016, 01:46:38 PM
Oh I got it..This is my first time using PM, so I was not sure about how to update  :D.. Anyways I checked the issue and its definitely resolved now.. All changes are being saved.. Thanks a lot.. Cheers!!  :) :)
Title: Re: Changes to PM are not saved all the time
Post by: Alex Chouls on February 11, 2016, 01:56:13 PM
Cool! Actually the Welcome Screen install is new and I'm still tweaking it. Since 1.8.0 is a big update I wanted to show a Backup Your Project dialog before importing, but it's not the usual import workflow so it's easy to miss...
Title: Re: Changes to PM are not saved all the time
Post by: Raptcha911 on February 12, 2016, 08:10:46 AM
Oh OK.. But normally PM can updated directly through the assetstore?
Title: Re: Changes to PM are not saved all the time
Post by: Alex Chouls on February 12, 2016, 10:39:42 AM
Yeah, that part is the same. Update and import from the Asset Store. But currently there's an extra step to import 1.8.0: Open Welcome Window and Install PlayMaker. That's the part that I'll probably tweak a little...
Title: Re: Changes to PM are not saved all the time
Post by: Raptcha911 on February 12, 2016, 12:32:19 PM
Awesome!  :)