Component menu in C#

I have the following bit of code:

[AddComponentMenu("Vehicle/Movement")]

And it does not add anything to the component menu!
What is the proper way to do this?

And what if I want to add a sub menu in the Vehicle menu?

You do that?

1 Like

Yup.

This is the entire script, and it worked perfectly here, without a restart necessary. U3 b4.

using UnityEngine;

[AddComponentMenu("Vehicle/Sub/Movement")]
class VehicleSubMovement : MonoBehaviour {}

353021--12277--$screen_shot_2010_07_23_at_111531_pm_162.png

I feel really dumb right now. I did not realize you had to put it before the class declaration(or whatever you call it)

Thanks a lot Jessy.