My simulation service references this class library, creates the entity
objects and calls SimulationEngine.GlobalInstancePort.Insert() to add the
objects to the simulation (similar to the simulation tutorials'
PopulateWorld() methods). This all works great. My entites appear in the
simulation and react appropriately.
The problem is, when I look at the XML representation of the
SimulationEngine state, I don't see any of my custom entities. I can see the
SkyEntity and CameraEntity, but no custom entities. In the Debug and Trace
Messages I see a slew of serialization errors that seem to boil down to:
"System.NotSupportedException: System.IntPtr is an unsupported type. Please
use [XmlIgnore] attribute to exclude members of this type from serialization
graph."
What am I doing wrong?