© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago
𝖃𝖙𝖔𝖓𝖎𝖔𝖗

Serialization abstract class and it's child's into xml

I'm making component system for my game engine (and have no idea what I'm doing, lol). I need to serialize my SceneData structure with all the entity datas and it's components. I'll probably go crazy doing this:

[XmlInclude(typeof(SomeComponent))]
public abstract class Component
{
...
}
[XmlInclude(typeof(SomeComponent))]
public abstract class Component
{
...
}


So, is there other ways to serialize all the Component childs (RigidBody, MeshRenderer, LightSource etc)?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ XML Serialization
C#CC# / help
4y ago
✅ Configure Xml Serialization
C#CC# / help
3y ago
❔ XML serialization woes
C#CC# / help
4y ago
❔ XML serialization - internal XML element
C#CC# / help
4y ago