Program menu


is my 1° time here if there is some error in title and questions hope someone correct it
and sorry for my incorrect English

I found in a unifycommunity script one like this script in c#,
good to reorder the most reused script, and it work fine

> using UnityEditor;  
> public class NameOfScript :
> MonoBehaviour  { [MenuItem ("My
> Script /Enemy/Enemy Die")]   
>     static void SomeName()  
>     {} ... ... ... }

and this for js,

> @AddComponentMenu("MY
> Script/Enemy/Enemy spawner") partial
> class EnemySpawner { }

but it allow me only put the script as “Component” subfolder
how I can put the js script toghether the c# ?
thank to all who answer

You can add your script to the selected component using a top level menu - but AddComponentMenu only adds to the Component menu :slight_smile:

 [MenuItem("My TopLevel Menu/Some Component")]
 static void AddSomeComponent() 
      if(Selection.activeGameObject != null)