Struggling to do something pretty simple. I want to add a field & property to the Colliders, however all classes implementing collider are sealed, and when you extend collider yourself Unity will not allow you to attach it to a GameObject, saying it must derive from Monobehaviour. Even though BoxCollider is extending Component and is allowed to be added. Is there a way to do what I want, or is the only alternative to add a class to all GameObjects with Collider components?
By Unity’s design, these classes aren’t supposed to be extended.
I would recommend you to create a new monobehaviour containing the properties you need, that requires a Collider to be attached to the Gameobject.
Thanks guys. I grudgingly went with that in the end and will make an editor script to put them against all selected objects or something (there’s loads to add lol).