How to handle persistent level variables?

I have a c++ script that places persistent items in a level (for my game level editor). For example, the script places MESH X, and assign its property ‘ID’ a value Y.
When I’m tampering around the level, changing small details here and there, sometimes I notice that the meshes have their properties reset to their default values (zero in this case). Also arrays generated by the script get lost.

If my explanation is clear, how do you handle persistance? What am I doing wrong?
Thanks!

Is the property set as Transient?

Is it being serialized correctly?

Are you setting default values for the properties in the constructor?

This should probably be moved to the C++ Section.

Hi DevilsD,

  1. no, the Properties are not Transient.
  2. I don’t know, how would I check if they are being serialized correctly? (I’m not familiar with the term to be honest)
  3. No, the values are not set in the Constructor.

I thought about posting in the C++ section, but I think the problem might not be with the C++, but with what happens after in the editor.

Up for visibility

up for visibility