Search Issue Tracker
By Design
Votes
0
Found in
2017.4
2017.4.25f1
2018.3
2019.1
2019.2.0a1
2019.3.0a1
Issue ID
1144992
Regression
No
Warnings are appearing when creating new scripts and project has more than 1000 scripts
How to reproduce:
1. Open the attached '1144992.zip' project
2. Create a new script
3. Observe the Console
Expected result: No messages
Actual result: "Unable to insert menu item into submenu since index exceeded limit of 1000, item's parent:Scripts" warnings appear
Reproducible: 2017.4.27f1, 2018.4.1f1, 2019.1.4f1, 2019.2.0b3, 2019.3.0a3
Not reproducible: 2017.4.0f1, 2018.3.0a1, 2019.1.0a1
Comments (3)
-
Playbosh-Games
Dec 10, 2022 12:02
Same problem with over 1000 animations to show up in the animator. Can we increase the limit?
-
hadynlander
May 29, 2019 06:50
The resolution advice has been updated, giving us a good workaround - please disregard my previous comment :)
-
hadynlander
May 28, 2019 01:18
To "not have all 1000 scripts inherit from MonoBehaviour" is not a satisfactory solution. In large projects this can become unavoidable. We need a way to disable the automatic population of the "Component" > "Scripts" menu, or to otherwise disable this particular warning so that it doesn't distract from potentially useful warnings every single time the project opens or compiles.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on ResizeScriptingList<ScriptingObjectPtr> when passing an undeclared variable to the results parameter for GameObject.FindGameObjectsWithTag
- [Android] "Screen.safeArea.y" always returns values outside of the Safe Area when the device is in Portrait orientation
- Frame spike due to many TreeRenderer.TreeUpdated calls when repositioning terrains in large Scenes
- Crash on GameObject::RemoveComponentFromGameObjectInternal when reparenting Text GameObjects
- [IL2CPP-GarbageCollector] Changing GCMode might permanently disable GC in a multithreaded context
Resolution Note (2019.3.X):
A menu item is automatically created for each MonoBehaviour in aproject, so it can be easily added to GameObjects in the "Component" > "Scripts" menu. This project has over 1000 MonoBehaviours, which exceeds the limit for the number of MonoBehaviours that can be added to the menu.
The workaround for this issue is to not have all 1000 scripts inherit from MonoBehaviour or use https://docs.unity3d.com/ScriptReference/AddComponentMenu.html to organise the scripts into sub menus to avoid hitting the limit.