playMaker

Author Topic: Can not set object variable in xml select single node for XML proxy  (Read 1645 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 11845
  • Official Playmaker Support
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #15 on: December 09, 2016, 02:45:20 AM »
Hi,

uhm. Are you sure you have downloaded the latest version, cause I did fixed this.

 What version does it mention in the changelog? you should have 1.2.1

 Bye,

 Jean

elusiven

  • Full Member
  • ***
  • Posts: 211
  • Debt we all must pay...
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #16 on: December 12, 2016, 02:44:25 AM »
Yes, I'm using 1.2.1 - Still the same error.

elusiven

  • Full Member
  • ***
  • Posts: 211
  • Debt we all must pay...
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #17 on: December 14, 2016, 04:39:27 AM »
Jean,

Please have a look at this video

https://youtu.be/L8CFbCf75UM

It clearly shows that I have the newest datamaker, and recent Playmaker version, and yet this still happens.. Please help, it's delaying my project :(

Also, is there a way to modify the XML Proxy, to work with string variables instead of text assets?? It doesn't work when I try to modify it, it comes up with a log that the XML is not properly formatted or something.
« Last Edit: December 16, 2016, 08:42:26 AM by elusiven »

elusiven

  • Full Member
  • ***
  • Posts: 211
  • Debt we all must pay...
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #18 on: January 08, 2017, 04:57:43 PM »
Any news on this? Seen my last video???

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 11845
  • Official Playmaker Support
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #19 on: January 09, 2017, 12:20:21 AM »
Hi,

 It's unfortunate, I can't replicate this!




If you are stuck with just this, simply move into a memory reference instead of a FsmString.

you don't need to modify the proxy, simply use the action "SaveInProxy", have you tried it?

Can you tell me where you xml source comes from?

Bye,

 Jean
« Last Edit: January 09, 2017, 12:23:04 AM by jeanfabre »

elusiven

  • Full Member
  • ***
  • Posts: 211
  • Debt we all must pay...
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #20 on: January 09, 2017, 03:32:12 AM »
The XML comes from an amazon s3 storage, so when the app starts the file gets downloaded and then it gets loaded into a string variable so ideally what I would like to do is to then use this variable to manipulate the xml but because of that error I am unable to do so.

update: I tried using memory referance and it comes up with the same error...
« Last Edit: January 09, 2017, 07:10:15 AM by elusiven »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 11845
  • Official Playmaker Support
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #21 on: January 10, 2017, 12:02:24 AM »
Hi,

Since I can't replicate, I am really stuck on how I can help out here unfortunatly.

Can you check what's your dataversion on that fsm where you have this problem ) dataversion available in small print at the bottom of the fsm tab of the PlayMaker editor) and have you tried on a fresh project?

 The  way to go is the following however: Save it inside a proxy using "XMlSaveInProxy" action, and follow that with a "XmlRefreshStringVersion" to check in the Unity inspector what's the content.

This way, you can bypass the issue of selecting an FsmString variable for the source in your actions.

 Bye,

 Jean

Bye,

 Jean

elusiven

  • Full Member
  • ***
  • Posts: 211
  • Debt we all must pay...
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #22 on: January 11, 2017, 08:28:35 AM »
When I set the xml proxy as a gameobject, with no variable and then use xML save in proxy then yes it works fine... But will it keep the reference when I build it and try on iOS or android or it won't?? after all it's only referencing a gameobject on scene no an actual gameobject saved in variable - But that's the only way that works for me without throwing up errors.

I just tried on my mac mini, updated everything to newest version and it's still coming up with that same error...

ArgumentException: Object type HutongGames.PlayMaker.FsmGameObject cannot be converted to target type: System.Boolean
Parameter name: val
System.Reflection.MonoField.SetValue (System.Object obj, System.Object val, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoField.cs:148)
System.Reflection.FieldInfo.SetValue (System.Object obj, System.Object value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/FieldInfo.cs:150)
HutongGames.PlayMakerEditor.ActionEditor.DoVariableSelection (System.Object userdata) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/ActionEditor.cs:2893)
UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, Int32 selected) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/GenericMenuBindings.gen.cs:122)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 11845
  • Official Playmaker Support
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #23 on: January 11, 2017, 11:07:08 PM »
Hi,

 yes, it keeps the reference.

how did you get this error when publishing on mac mini? this error looks like coming from the Unity Editor.


 Bye,

 Jean

elusiven

  • Full Member
  • ***
  • Posts: 211
  • Debt we all must pay...
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #24 on: January 12, 2017, 02:34:16 AM »
This is the error I get when trying to select a variable for my XML proxy in the datamaker's xml node action.

elusiven

  • Full Member
  • ***
  • Posts: 211
  • Debt we all must pay...
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #25 on: January 12, 2017, 10:26:15 AM »
Now i'm stuck again with the same problem.. I have a template which generates some of the items on ugui for me, and I wanted to display the player's progress on it.. And it happens that I MUST use a variable when using the xml proxy, so that same error pop ups and it won't let me select

It's weird though that the errors says that it can't convert like gameobject to system.boolean? Wtf?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 11845
  • Official Playmaker Support
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #26 on: January 12, 2017, 11:47:01 PM »
Hi,

 what's really odd is that I can't repro this.

Can you confirm you have tried on a clean fresh project and with a simple, fsm , one state, with just that action, you still have this problem?

Bye,

 Jean

elusiven

  • Full Member
  • ***
  • Posts: 211
  • Debt we all must pay...
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #27 on: January 13, 2017, 03:03:10 AM »
Okay, we might have a breakthrough lol... I made a brand new project with one fsm and one proxy, and it worked. I don't have any errors though in playmaker, and no unity errors...So now the question is ... How can I debug my existing one to find out why it's not working?
« Last Edit: January 13, 2017, 03:05:14 AM by elusiven »

elusiven

  • Full Member
  • ***
  • Posts: 211
  • Debt we all must pay...
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #28 on: January 13, 2017, 04:21:50 AM »
I get these warnings and that error in my existing project.




I did a little test... I packaged the current project in .asset and then created brand new project.. Installed playmaker, datamaker, ES2 etc... Imported that asset package... I have shi*t loads of errors but I can add a variable for proxy lol... Does that help?
« Last Edit: January 13, 2017, 04:34:09 AM by elusiven »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 11845
  • Official Playmaker Support
    • View Profile
Re: Can not set object variable in xml select single node for XML proxy
« Reply #29 on: January 16, 2017, 01:26:25 AM »
Hi,

 I am still unsure if you actually tested a fresh project with Just DataMaker yet?

 I am suspecting that the PlayMaker Utils from the dataMaKer package get overwriting by an older version from another package and so you loose the fixes.

 Make sure you reimport DataMaker, that could be just what's needed.

 Bye,

 Jean