Let's say iI have a class named Entity such as:
class Entity
{
public string name;
public List<Behavior> behaviors;
// other stuff...
}
I want to create an editor window that allow game designers to create "instances" of that class by giving the name and a set of Behavior, which are premade classes by devs.
What
What I need is a file format to save what the proper way (or one of them)game designers have input in the editor window when they click on "save", like json, to use that data later in the runtime of the game. But, of course, you can't save a list of polymorphic classes instances with json, so I'm looking for alternatives.
How can I save what GDsdesigners create and useload/instantiate/use it during runtime?
At first, I was thinking of creating prefabs, but:
prefabutility.createprefabis tagged as Obsolete in the docdocs- I don't know if it's a good solution in term of memory, maintainability, scalability, ...