𝖃𝖙𝖔𝖓𝖎𝖔𝖗
𝖃𝖙𝖔𝖓𝖎𝖔𝖗
CC#
Created by 𝖃𝖙𝖔𝖓𝖎𝖔𝖗 on 5/11/2024 in #help
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)?
1 replies