I'm using it for my Sprite Button plugin, which is how it supports custom shaped buttons. Here's what I have now with OnFrame():
// Set the collision mask for this object
// iTextureD is the main button face texture
// Don't call anymore
And here's what I was doing in OnCreate():
// Load the edittime data that was serialized.
// Read the data. Same format as you exported in EditExt::Serialize.
// Your runtime loader must be able to load all versions!
int Version = 0;
ar >> Version;
// Texture loader thingy
// Load the default texture
imgTexture = pRuntime->LoadSerializedImageHandle(ar);
iTextureD = renderer->CreateTextureFromHandle(imgTexture);
// Update the object's collision mask
The first method works fine until I load from a runtime save, and the second one crashes upon loading a runtime save or when there are multiples of the object.
Also, as a side note, the serialization code(not shown) is merely loading/saving some variables, so I don't think it's causing any problems.