playMaker

Author Topic: Creating Global Variables Error  (Read 1495 times)

Lochnload

  • Playmaker Newbie
  • *
  • Posts: 4
Creating Global Variables Error
« on: December 13, 2021, 08:18:28 AM »
Hello,

I have recently started using playmaker. In my project, i am trying to create a global variable but i am having these 2 following errors. After every time i reload the scene, global variables disappear. What am i suppose to do ? Thanks in advance. I am using Unity 2020.3.23f1 and playmaker 1.9.4 f2
 
Error 1

UnityException: Creating asset at path Assets/Custom%20Assets/PlayMaker/Resources/PlayMakerGlobals.asset failed.
HutongGames.PlayMakerEditor.FsmEditor.CreateAsset (UnityEngine.Object asset, System.String& path) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditor.cs:2530)
HutongGames.PlayMakerEditor.FsmEditor.SaveGlobals (PlayMakerGlobals globals) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditor.cs:2557)
HutongGames.PlayMakerEditor.FsmEditor.SaveGlobals () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditor.cs:2540)
HutongGames.PlayMakerEditor.EditFsmVariables.AddVariable (HutongGames.PlayMaker.FsmVariables variables, HutongGames.PlayMaker.VariableType type, System.String name, System.Type objectType, HutongGames.PlayMaker.VariableType typeConstraint) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/EditFsmVariables.cs:94)

Error 2

UnityException: Creating asset at path Assets/Custom%20Assets/PlayMaker/Resources/PlayMakerGlobals.asset failed.
HutongGames.PlayMakerEditor.FsmEditor.CreateAsset (UnityEngine.Object asset, System.String& path) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditor.cs:2530)
HutongGames.PlayMakerEditor.FsmEditor.SaveGlobals (PlayMakerGlobals globals) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditor.cs:2557)
HutongGames.PlayMakerEditor.FsmEditor.SaveGlobals () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditor.cs:2540)
HutongGames.PlayMakerEditor.EditFsmVariables.AddVariable (HutongGames.PlayMaker.FsmVariables variables, HutongGames.PlayMaker.VariableType type, System.String name, System.Type objectType, HutongGames.PlayMaker.VariableType typeConstraint) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/EditFsmVariables.cs:94)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4145
  • Official Playmaker Support
    • LinkedIn
Re: Creating Global Variables Error
« Reply #1 on: December 13, 2021, 01:09:13 PM »
It looks like you moved PlayMaker from its default location to a “Custom Assets” folder. This should be supported but it seems something is not working right. I’ll try to reproduce the error here. In the meantime, can you double check that the resources folder exists in the path shown in the error? Or that it works if you temporarily move the PlayMaker folder back to the root of Assets?

Lochnload

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Creating Global Variables Error
« Reply #2 on: December 14, 2021, 04:54:37 AM »
Hello Alex Thanks for the reply.

I created new project and worked for the new project and i manually copied playmakerglobal.assets from one that worked to my current project and it worked.


Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4145
  • Official Playmaker Support
    • LinkedIn
Re: Creating Global Variables Error
« Reply #3 on: December 15, 2021, 10:49:51 AM »
Glad you found a workaround. We’ll get a fix for this into the next update.