No Script option in component Menu?! (Unity 5.3.1)
I have been been following the Roguelike tutorials and encountered an error while doing Tutorial 7 (https://www.youtube.com/watch?v=MEA4Qqpcwpg). the tutorial says to add a script to a prefab by use of the component menu > script > scriptname.
It appears that the scrip option in the component menu has been removed. I have attached a screenshot of my component menu:
How can I now attach pre-prepared C# scripts to prefabs? (I think I found an option to add a new script using add component in the hierarchy menu)
Select the prefab and click on Add Component > then type the name of your script to attach. If your script is not co$$anonymous$$g then it means any of your script may contains error . Resolve the error and then check the same
i have no option to add a script. only too create a new script. even in add component >
Answer by OriginalsByToto · Jan 29, 2016 at 07:56 PM
Hello,
you can add your script by drag and drop it from the Project window to the prefab in the Hierarchy window.
Hello.
I have tried this but unity says to "fix compiler errors" even though there are no errors in that script.
Answer by ModernBarbarian · Oct 24, 2017 at 04:43 AM
I had the same issue, turns out there was a compile error in one of the scripts. Once this was fixed the scripts option appeared!
Your answer
![](https://koobas.hobune.stream/wayback/20220612061825im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Prefab UI Slider misses the fill and background items... 0 Answers
prefab script accesses prefab values instead of instantiated values - but only in the player 0 Answers
Single Image Map Pan/Zoom & Coordinates 1 Answer
Trouble with score management. 1 Answer
TMP text that was changed from script is overridden by the one in editor 0 Answers