Jump to content

Issue in .prop file after saving properties


photo

Recommended Posts

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

Link to comment

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:

Link to comment
×
×
  • Create New...