Godot Version
4.2.2 stable mono
Question
Is it possible when writing scripts for Resources in C# to extend the serialization logic yourself (like in Unity for example, you can leverage the ISerializationCallbackReceiver
interface). My ideal goal is I want to add certain features like shallow reference serialization (i.e. by-ref serialization, where duplicate data is serialized once and an ID is assigned for subsequent references), and polymorphic type determinism (i.e. to allow serialization of abstract types and interfaces, by including the necessary assembly and type information to reconstruct the concrete type). I imagine Godot doesn’t support these features in it’s serialization backend, but if it does have callbacks or other mechanisms to let us write our own custom serializers and deserializers, then we can add these features ourselves for a more ‘native’ experience.