Cannot Load data using Playmaker
Cannot Load data using Playmaker
Hi,
I'm new to ES. I use Playmaker and I'm just trying to setup a simple save/load of a Float value. I tried to follow a couple of your PM guides but to no such luck.
I have it working with regards to adding a float, setting it, displaying it in GUI and according to the ES load and save it's displaying there at runtime, but when I stop and hit play again, it's not saving. I have the ES Manager in the scene as well.
Does the object in the scene need to be a prefab?
I've included some screenshots.
Thanks!
Shizane
I'm new to ES. I use Playmaker and I'm just trying to setup a simple save/load of a Float value. I tried to follow a couple of your PM guides but to no such luck.
I have it working with regards to adding a float, setting it, displaying it in GUI and according to the ES load and save it's displaying there at runtime, but when I stop and hit play again, it's not saving. I have the ES Manager in the scene as well.
Does the object in the scene need to be a prefab?
I've included some screenshots.
Thanks!
Shizane
- Attachments
-
- Screenshot 2022-06-10 111036.jpg (112.61 KiB) Viewed 1477 times
-
- Screenshot 2022-06-10 111054.jpg (130.08 KiB) Viewed 1477 times
-
- Screenshot 2022-06-10 111110.jpg (161.61 KiB) Viewed 1477 times
Re: Cannot Load data using Playmaker
Hi there,
There is an error in your logic. Your Save state will only be called if data exists (as it comes after the 'Exists' event), but data can only exist if your Save state gets called. This means it's impossible for the Save or Load state to ever be triggered in your example.
All the best,
Joel
There is an error in your logic. Your Save state will only be called if data exists (as it comes after the 'Exists' event), but data can only exist if your Save state gets called. This means it's impossible for the Save or Load state to ever be triggered in your example.
All the best,
Joel
Re: Cannot Load data using Playmaker
Hey Joel thanks for the reply.
I guess I'm not sure what you mean. The data does exist, in this case a float of 50 and it shows "50" in the Save action.
Before I did this I actually even had the Save action on the same state as the Set float but still doesnt seem to fire.
I also just tried a couple of your PM examples, nameley the sphere transform. I moved and scaled it at runtime, stopped and hit play again and it's still in the same default size/position.
I do get this warning though:
Reference for UnityEngine.Transform with ID 3317867690819737200 could not be found in Easy Save's reference manager. If you are loading objects dynamically (i.e. objects created at runtime), this warning is expected and can be ignored.
To disable warnings from Easy Save, go to Window > Easy Save 3 > Settings, and uncheck 'Log Warnings'
UnityEngine.Debug:LogWarningFormat (UnityEngine.Object,string,object[])
ES3Internal.ES3Debug:LogWarning (string,UnityEngine.Object,int) (at Assets/Plugins/Easy Save 3/Scripts/Debugging/ES3Debug.cs:30)
ES3Internal.ES3ReferenceMgrBase:Get (long,System.Type,bool) (at Assets/Plugins/Easy Save 3/Scripts/ES3ReferenceMgrBase.cs:175)
ES3Types.ES3ComponentType:ReadObject<object> (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ComponentType.cs:72)
ES3Types.ES3ObjectType:Read<object> (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:54)
ES3Reader:ReadObject<object> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:253)
ES3Reader:Read<object> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:282)
ES3Reader:Read<object> (string,object) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:216)
ES3:Load<object> (string,object,ES3Settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:483)
ES3PlayMaker.Load:Enter () (at Assets/Plugins/Easy Save 3/PlayMaker/ES3PlayMaker.cs:419)
ES3PlayMaker.ActionBase:OnEnter () (at Assets/Plugins/Easy Save 3/PlayMaker/ES3PlayMaker.cs:43)
HutongGames.PlayMaker.FsmState:ActivateActions (int) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:222)
HutongGames.PlayMaker.FsmState:OnEnter () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:192)
HutongGames.PlayMaker.Fsm:EnterState (HutongGames.PlayMaker.FsmState) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:3073)
HutongGames.PlayMaker.Fsm:SwitchState (HutongGames.PlayMaker.FsmState) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:3012)
HutongGames.PlayMaker.Fsm:UpdateStateChanges () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2945)
HutongGames.PlayMaker.Fsm:Start () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2169)
PlayMakerFSM:Start () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:595)
I guess I'm not sure what you mean. The data does exist, in this case a float of 50 and it shows "50" in the Save action.
Before I did this I actually even had the Save action on the same state as the Set float but still doesnt seem to fire.
I also just tried a couple of your PM examples, nameley the sphere transform. I moved and scaled it at runtime, stopped and hit play again and it's still in the same default size/position.
I do get this warning though:
Reference for UnityEngine.Transform with ID 3317867690819737200 could not be found in Easy Save's reference manager. If you are loading objects dynamically (i.e. objects created at runtime), this warning is expected and can be ignored.
To disable warnings from Easy Save, go to Window > Easy Save 3 > Settings, and uncheck 'Log Warnings'
UnityEngine.Debug:LogWarningFormat (UnityEngine.Object,string,object[])
ES3Internal.ES3Debug:LogWarning (string,UnityEngine.Object,int) (at Assets/Plugins/Easy Save 3/Scripts/Debugging/ES3Debug.cs:30)
ES3Internal.ES3ReferenceMgrBase:Get (long,System.Type,bool) (at Assets/Plugins/Easy Save 3/Scripts/ES3ReferenceMgrBase.cs:175)
ES3Types.ES3ComponentType:ReadObject<object> (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ComponentType.cs:72)
ES3Types.ES3ObjectType:Read<object> (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:54)
ES3Reader:ReadObject<object> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:253)
ES3Reader:Read<object> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:282)
ES3Reader:Read<object> (string,object) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:216)
ES3:Load<object> (string,object,ES3Settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:483)
ES3PlayMaker.Load:Enter () (at Assets/Plugins/Easy Save 3/PlayMaker/ES3PlayMaker.cs:419)
ES3PlayMaker.ActionBase:OnEnter () (at Assets/Plugins/Easy Save 3/PlayMaker/ES3PlayMaker.cs:43)
HutongGames.PlayMaker.FsmState:ActivateActions (int) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:222)
HutongGames.PlayMaker.FsmState:OnEnter () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:192)
HutongGames.PlayMaker.Fsm:EnterState (HutongGames.PlayMaker.FsmState) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:3073)
HutongGames.PlayMaker.Fsm:SwitchState (HutongGames.PlayMaker.FsmState) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:3012)
HutongGames.PlayMaker.Fsm:UpdateStateChanges () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2945)
HutongGames.PlayMaker.Fsm:Start () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2169)
PlayMakerFSM:Start () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:595)
Re: Cannot Load data using Playmaker
Hi there,
By 'data not existing' I mean a save file containing the data will not exist.
You call the Key Exists action in your first state to check whether the key 'saveAllData' exists, but for this to exist the Save action must be called. As your Save action is only called if data exists, this will always follow the 'DoesntExist' path unless the key has been saved elsewhere outside of this FSM beforehand.
All the best,
Joel
By 'data not existing' I mean a save file containing the data will not exist.
You call the Key Exists action in your first state to check whether the key 'saveAllData' exists, but for this to exist the Save action must be called. As your Save action is only called if data exists, this will always follow the 'DoesntExist' path unless the key has been saved elsewhere outside of this FSM beforehand.
All the best,
Joel
Re: Cannot Load data using Playmaker
I understand what you're saying there now, but I just tried again to throw the save / load in the same state as my set float and got rid of the "exists". It's still not firing.
Also what could be the issue with your examples not working and that warning?
Also what could be the issue with your examples not working and that warning?
Re: Cannot Load data using Playmaker
Hi there,
As we’ve had no other reports of issues with PlayMaker, please could you replicate your issue in a new project with a simple scene and private message it to me with instructions.
All the best,
Joel
As we’ve had no other reports of issues with PlayMaker, please could you replicate your issue in a new project with a simple scene and private message it to me with instructions.
All the best,
Joel
Re: Cannot Load data using Playmaker
Well I get this error when I open the Playmaker Variable example:
Broken text PPtr in file(Assets/Easy Save 3/Examples/Saving and Loading a Variable with PlayMaker/Saving and Loading a Variable with PlayMaker.unity). Local file identifier (1961861168) doesn't exist!
Broken text PPtr in file(Assets/Easy Save 3/Examples/Saving and Loading a Variable with PlayMaker/Saving and Loading a Variable with PlayMaker.unity). Local file identifier (1961861168) doesn't exist!
Re: Cannot Load data using Playmaker
Hi there,
I am not getting the error you mention on the latest version of Unity with the Saving and Loading a Variable example. I recommend that you ensure that you're on the latest version as this is an importer error rather than an error with our scripts, so it indicates an issue at Unity's end rather than ours.
Also when Broken text PPtr errors usually occur they don't normally prevent the import of the package. Could you confirm whether the package is imported after this error occurs?
All the best,
Joel
I am not getting the error you mention on the latest version of Unity with the Saving and Loading a Variable example. I recommend that you ensure that you're on the latest version as this is an importer error rather than an error with our scripts, so it indicates an issue at Unity's end rather than ours.
Also when Broken text PPtr errors usually occur they don't normally prevent the import of the package. Could you confirm whether the package is imported after this error occurs?
All the best,
Joel
Re: Cannot Load data using Playmaker
Yeah I'm running 2021.3.4 and ES 3.4.2.
Yes the package imported, I was playing around with it. I'm just not able to save/load data with Playmaker. It's very frustrating. I've been using PM for years.
Yes the package imported, I was playing around with it. I'm just not able to save/load data with Playmaker. It's very frustrating. I've been using PM for years.
Re: Cannot Load data using Playmaker
Hi there,
Please could you replicate the issue in a new project and private message it to me with instructions so that I can see what is happening, as the Saving and Loading a Variable example appears to be working fine at our end and we've had no other reports of issues with it.
Also note that the Saving and Loading a Variable example demonstrates saving and loading an FSM Variable. It saves an FSM String variable, then clears the variable, and then reloads the value of that FSM String value.
You previously mentioned the position and scale of an object but this isn't the purpose of that example, if this is example you are referring to.
All the best,
Joel
Please could you replicate the issue in a new project and private message it to me with instructions so that I can see what is happening, as the Saving and Loading a Variable example appears to be working fine at our end and we've had no other reports of issues with it.
Also note that the Saving and Loading a Variable example demonstrates saving and loading an FSM Variable. It saves an FSM String variable, then clears the variable, and then reloads the value of that FSM String value.
You previously mentioned the position and scale of an object but this isn't the purpose of that example, if this is example you are referring to.
All the best,
Joel