For a particular script, I would like to prevent it from being attached more than once per gameobject.
When you try to add (for example) a Rigidbody component to a GameObject that already has one, a dialog box appears with the following text:
Can’t add the same component multiple times!
The component Rigidbody can’t be added because GameObject already contains the same component.
Is it possible to have this or similar behaviour for custom components, i.e. scripts?
Thank you!