RequireComponent - At least one of multiple types

Is is possible to use RequireComponent to make sure one type of a collection of types is present in the same GameObject?

Example: Require at least one text component. Possible would be UnityEngine.Text or TextMeshProUGUI.

No and that wouldn’t make any sense. The only point of RequireComponent is that Unity will automatically add the required type when you add the class that requires that additional component. The RequireComponent attribute does not enfore or “make sure” that this component is present. The moment you add your class the editor will automatically add the required component as well if it isn’t present yet. However if you then manually remove that required component nothing happens. The attribute will only take effect the moment you add a component in the editor. Adding a component at runtime (through AddComponent) does not trigger that behaviour.

Now if you could specify multiple different implementations of a required component, which one should the editor add if none is present? Apart from that the Text component and the TextMeshPro component have absolutely nothing in common.

If you have more complex requirements for your own component it might be a good idea to just write a custom editor that displays a warning in the inspector if the requirements are not fulfilled