- Home /
rename scripts
Hi Guys, I was wondering if I am able to rename a script easily, I'm only asking because I have a million scripts and it's getting hard to sort thru them
if the scripts depend on each other, they contain references to each others names to get variables from each other.
Answer by Linus · Feb 20, 2014 at 02:36 AM
Yes its rather easy. More so if using UnityScript. You can then pretty much just rename them in the project view and update any reference variable you have in other scripts. Unity will alert you of invalid types in places you need to update.
If its C# you will also need to rename the class to match the file name.
Thank you. I would vote your answer up but I think I need 5 more karma or something
Just to add to the answer that @Linus provided. If you are using C# and Unity's built in $$anonymous$$onoDevelop editor, you can highlight the name of the class in the script, right-click and chose "Refactor -> Rename" from the context menu. This will prompt you to rename the class and rename the file accordingly.
Thanks fr the tip Tricky Think you get points for closing question by choosing an answer.
Your answer
![](https://koobas.hobune.stream/wayback/20220613134107im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
DamageScript 1 Answer
Simple AI Script help 2 Answers
Error Code BCE0019 1 Answer
hide object start script 4 Answers