Changing name of component?

I look for a game object or I create one on the fly and attach a custom script. However, it seems that only setting the ‘name’ property only changes the parent game object’s name in the hierarchy. I currently just see the name of my script as ‘Script’ attached to my game object. How can I change this to reflect the name of the custom component?

Another thing, can I actually set tags to just components of game objects or can tags only be applied to the game objects themselves?

I actually did find a way to do this recently. Try adding the [AddComponentMenu("...")] decorator to your Monobehaviour script, eg:

[AddComponentMenu("My Special Component")]
public class MyScript : MonoBehaviour { ... }

See AddComponentMenu for more info.

,I actually did find a way to do this just recently. You want to use [AddComponentMenu(...)] for your Monobehaviour, eg:

public class MyComponent : MonoBehaviour { ... }

See AddComponentMenu for more info

You can’t change the name of components; the name of a script is printed in the title bar of the component followed by (Script). Tags are a property of GameObjects.

So I’m 10 years late in answering this (sorry!), but for those who stumble upon this page after googling if renaming components in Unity is possible… it is now!

Well, still not as a built-in feature in Unity, but I just put out an asset called Component Names that fixes this shortcoming.

before and after: