p.vaz Posted August 20, 2015 Posted August 20, 2015 Hi, I've created a file library_test.prop that I load in a test project in the init() function : engine.properties.addWorldLibrary("properties/library_test.prop"); Here is the file (library_test.prop) : <?xml version="1.0" encoding="utf-8"?> <properties version="1.00"> <property name="property_aaa"> <state name="type" type="switch" items="type1,type2">0</state> <state name="state1">0</state> <parameter name="param1" type="int" max="1000">233</parameter> <parameter name="param2" type="float" max="100">30</parameter> <parameter name="param3" type="string"/> </property> </properties> In the editor, in the property panel, I change for example a parameter value and I save the properties (with the floppy icon) : After that, i quit Unigine (without saving the world), when I reload my script, the property file has changed and I cannot get the parameters anymore in the editor because it seems like the previous save has changes the types of the parameters with "0" like that : <?xml version="1.0" encoding="utf-8"?> <properties version="1.00"> <property name="property_aaa"> <state name="type" type="switch" items="type1,type2">0</state> <state name="state1">0</state> <parameter name="param1" type="0" max="1000">544</parameter> <parameter name="param2" type="0" max="100">30</parameter> <parameter name="param3" type="0"/> </property> </properties> Is there a bug or have I made something wrong ? Thanks in advance, Philippe VAZ
silent Posted August 21, 2015 Posted August 21, 2015 Hi Philippe, This is actually looks like a bug. We will check it and report back ASAP. Thank you for noticing! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
silent Posted August 21, 2015 Posted August 21, 2015 Hi Philippe, It is a bug. I've added it to our internal bug tracker. Simple workaround is to change state name to something different from "type". For example: <state name="type" type="switch" items="type1,type2">0</state> >>>> <state name="type_of_object" type="switch" items="type1,type2">0</state> Sorry for the inconvenience caused. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
sebastianbah Posted August 27, 2015 Posted August 27, 2015 Hi Philippe, Fix for this issue will be available in next SDK release.
Recommended Posts