Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: djaydino on September 13, 2015, 06:35:49 AM

Title: Datamaker / xml set node propperties
Post by: djaydino on September 13, 2015, 06:35:49 AM
Hi,
I am preparing for a tutorial for datamaker but "xml set node propperties" does not seem to work.

also the insert node i can't get to work properly

i made a video to explain :

Title: Re: Datamaker / xml set node propperties
Post by: djaydino on September 13, 2015, 02:22:41 PM
btw, i use latest official version of unity3d and PM.
and latest datamaker on the ecosystem
Title: Re: Datamaker / xml set node propperties
Post by: jeanfabre on September 14, 2015, 03:51:44 AM
Hi,

This is great that you are making tuts for DataMaker, thanks!!!

 regards the issue, this is me sorry... you need to use "@id" in the Attribute value of XmlSetNodePRoperties.

  I should make it clearer. I have renamed the fields to "properties", as really this is not just to set attributes, but any kind of properties within that node.

Bye,

 Jean
Title: Re: Datamaker / xml set node propperties
Post by: djaydino on September 19, 2015, 01:40:07 AM
Hi,
i have send a mail and an pm to you jean but i did not get an answer yet so i will ask again here :)

How do i set up the text in xml for the properties : color / gameobject / material / object / Quaternion / rect / texture ?

like for example, for a vector 2 i need to set the text in the xml like this :

Code: [Select]
myVector2="vector2(2,1)"
Title: Re: Datamaker / xml set node propperties
Post by: djaydino on September 21, 2015, 01:29:35 AM
bump
Title: Re: Datamaker / xml set node propperties
Post by: jeanfabre on September 21, 2015, 01:38:20 AM
Hi,

 sorry for the delay, pm is not ideal for, I tend to ignore them inconsciously because It's hard to follow, there is not conversation to track the problem over a series of messages, so yeah... please post or send me emails directly :)

 You'll find a whole set of "convertXtoY" on the Ecosystem, and so "ConvertVector3ToString" and "ConvertStringToVector3"

you'll get full control over how to convert, the default settings will have a string like "Vector3(x,y,z)", but you get simply have "x,y,z" if you want to minimize xml string file size.

 Bye,

 Jean
Title: Re: Datamaker / xml set node propperties
Post by: djaydino on September 21, 2015, 01:01:30 PM
Hi,
 i found some issues so far and i just made a quick video

Title: Re: Datamaker / xml set node propperties
Post by: djaydino on September 21, 2015, 01:22:02 PM
Hi,
another thing i noticed is that the Convert values are (standard) with a capital letter,
but in the xml i need to use the values without a capital letter.
Title: Re: Datamaker / xml set node propperties
Post by: djaydino on September 22, 2015, 03:51:55 PM
Bump
Title: Re: Datamaker / xml set node propperties
Post by: jeanfabre on September 23, 2015, 01:20:33 AM
Hi,

 that's fine, you simply edit the format. Instead of having "Vector3(

 Bye,

 Jean
Title: Re: Datamaker / xml set node propperties
Post by: djaydino on September 23, 2015, 01:29:41 AM
Hi,
did you check the video from my previous post with the color problem?
(color giving an rgba value) and no globals
Title: Re: Datamaker / xml set node propperties
Post by: jeanfabre on September 23, 2015, 02:08:29 AM
Hi,

 ah yes sorry, I skipped that. I just watched it, I am on it.

 Bye,

 Jean
Title: Re: Datamaker / xml set node propperties
Post by: jeanfabre on September 23, 2015, 04:28:06 AM
Hi,

 ok, for color conversion, it looks to me that there it use capital C but the xml string is lower c.

and you seem to be confused with setting and setting data in and out of xml.

 if you want to save a color in xml, you need to convertColorToString, and save the string in a xml property, here you are doing the opposite it seems.

Conversion of colors work well here, I tested and it's all good. how would you see colors being converted as strings? as hexadecimal?

As for globals. Yeah, currently because it's a custom editor for the action, I don't have access to the globals. Hopefully when 1.8 is out, I'll do an update on this.


Bye,

 Jean
Title: Re: Datamaker / xml set node propperties
Post by: djaydino on September 23, 2015, 02:19:58 PM
Hi,

the conversion was only there for testing :)
its not connect or saving anything

i am making the xml manually and testing how to get the "values" directly for each "type"

and then i used a value for the color : color(100,100,100,255) and that did not work properly.

with the color conversion action i need to turn off "32 bit" and then i get the right value : color(0.3921569,0.3921569,0.3921569,1)

now i am still trying to figure out how write the values in xml for the type's :

gameobject, material, object and texture
Title: Re: Datamaker / xml set node propperties
Post by: jeanfabre on September 24, 2015, 02:00:08 AM
Hi,

 Ok, I'll do a sample.

 for GameObject, material, texture, and object, it will be up to particular needs because they are not really serializable easily, especially objects  ( GO, material and object), for texture,

--GameObject: use the name or the full path name ( I can make an action for that if you want)
-- Texture: use Resources and save the relative path, or use a Url and download, or use an id and have your textures referenced in ArrayMaker on a Hashtable
-- Material: same as textures, url could point to bundles
-- objects: it depends the object, but data will likely need to be serialized specifically to fit into xml

Bye,

 Jean
--