Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started 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 :
-
btw, i use latest official version of unity3d and PM.
and latest datamaker on the ecosystem
-
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
-
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 :
myVector2="vector2(2,1)"
-
bump
-
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
-
Hi,
i found some issues so far and i just made a quick video
-
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.
-
Bump
-
Hi,
that's fine, you simply edit the format. Instead of having "Vector3(- ,[y],[z])" you simply put "vector3(
- ,[y],[z])" or "
- ,[y],[z]" even. and in when converting back you do the same so that it matches
Bye,
Jean
-
Hi,
did you check the video from my previous post with the color problem?
(color giving an rgba value) and no globals
-
Hi,
ah yes sorry, I skipped that. I just watched it, I am on it.
Bye,
Jean
-
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
-
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
-
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
--