How to create a Class as a Component who can add to the Node

To do that,what class do i need inherit,and what thing do i do follow,
and my component i serializable when i use Scene->SaveXML();

Or i don’t create a component, just make my class can add to the Node like other component,and i serializable auto when i use Scene->SaveXML();

To add class as Component you should inherit it from Component. You could also use more specific Component derivatives like LogicComponent or Drawable or CustomGeometry or so on depending on your goals.

thank you ,i’ll try.