I have come to a point where I've totally given up on Unity's serialization of interfaces. [SerializedReference] doesn't do what it's supposed to do at all, and I don't wish to create a bunch of unnecessary classes just to serialize.
Either way, now I've resorted to using UnityEngine.Object as the serializing type for these "un-serializable" objects. Now, however, I wish to create an attribute [Restrict] that restricts the type of the object.
However, I struggle with figuring out how to use reflection to loop over all the fields that use this attribute, and apply checks for them. To use FieldMember.GetValue() I require an instance, but I don't know how to get/specify this instance, seeing as I want to implement a sort of global manager that handles this reflection.
So, to be honest, I don't even know where to go from here. I've got no clue how to construct this system. If anyone has experience and knows a good way of doing such a thing I'd appreciate your help.
Thanks in advance.