Is there a way to make an ObjectField that can take 2 or more types of objects?
For example, I want to make an ObjectField where you can assign only BoxCollider OR a SpriteRenderer, but no other types.
My idea would be to make the ObjectField itself take any objects of type Object, then in OnInspectorGUI() I check the type of Object, if it doesn’t match a type that I want, then… do/dont do something? The problem with that is it the slot itself will appear to accept any type, (you won’t get that ‘not allowed’ icon when trying to assign the slot - it’ll look like you can do it, but it just won’t work)