- Home /
AddComponentMenu strange behaviour
Updated:
I have two c# libraries (framework 3.5) in plugin folder. (Unity 5.1.2p2)
First library has:
[AddComponentMenu("Game/Core/Components/test1")]
public class Class1 : MonoBehaviour { }
[AddComponentMenu("Game/Core/Components/test2")]
public class Class2 : MonoBehaviour { }
Second library has:
[AddComponentMenu("Game/General/Components/test3")]
public class Class3: MonoBehaviour { }
When i open "add component" menu in Editor, all 3 scripts located in Game/Core/Components. Is this normal behaviour or bug?
@Hellium Question updated, i provide additional information. There is no white spaces. it was my typo.
Answer by palash_bhowmick1 · Aug 27, 2015 at 12:40 PM
This is normal behaviour...As [AddCOmponentMenu] is used to make it place in Menu tab... If you delete that line of [AddComponentMenu] then those won't be shown in Menu tab...
But i think two scripts should be located under Game/Core/Components And third one under Game/General/Components
All of them located under Game/Core/Components
Your answer

Follow this Question
Related Questions
Why "AddComponent" behaves differently in "Play" and "Edit" modes? 0 Answers
How to add a script to an imported object 2 Answers
Add scripts by script in editor 2 Answers
NullReferenceException - Editor script using GetComponent after AddComponent 1 Answer
AddComponent() creating two colliders? 0 Answers