void LayerSelectMenu()
{
List<GUIContent> Menu = new List<GUIContent>();
List<string> names = new List<string>();
foreach (MBLayer lyr in SelectedParticleSystem.Layer){
string n = lyr.name;
while (names.Contains(n)) {
n += " ";
}
Menu.Add(new GUIContent(n));
names.Add(n);
}
EditorUtility.DisplayCustomMenu(new Rect(Event.current.mousePosition.x, Event.current.mousePosition.y, 100, 100),
Menu.ToArray(), -1, OnLayerSelectMenu, null);
}