I cant find any rename button (enter or F2 also doesnt work).
Im using a mac.
Answer by Lipis
Mar 15, 2010 at 10:47 AM
Thank you, the Problem was my external usb keyboard :D
You're welcome... If you haven't read that already you should take a look if you are new around here or stackoverflow.com: http://answers.unity3d.com/faq regards
That is a lifesaver. Also works on material assets etc. This is so counterintuitive that it should be fixed in Unity.
Answer by Eric5h5
Mar 15, 2010 at 02:16 PM
Aside from the return key, you can click on a file, wait for a bit, then click again (don't click again too fast). This is also the same way to rename files in the OS.
This works, but then the game object starts complaining that it can't find the file. Strangely it does use the new renamed name, but still can't find it.
Answer by davem123us
Dec 18, 2012 at 09:32 PM
The only way to fully and gracefully rename a monobehaviour script that I have found:
Inside of Unity, rename the file that contains the script to the desired name. (Select the script, wait 2 seconds, click again, then type the new name)
Inside of MonoDevelop, open the script, right click on the class name, choose "refactor" > "rename". Uncheck the "rename file" box.
Make the new class name the same as the new file name you used in Unity.
Save all open MonoDevelop files.
Close Unity (don't save the scene)
Now your monobehaviour class is fully renamed / refactored.
That's a nightmare! It's faster to create a whole new script and paste all code in there :-(
This is very helpful. I had a prefab that the script was attached to. This saved time.
Answer by renderhjs
Jun 17, 2010 at 03:54 AM
Hitting F2 in Windows with folders doesn't work sometimes - it just goes back to the former folder (just like a Assets folder keep re- appearing within the Assets folder after deleting it). Clicking twice on the folder name and then giving it a new name works however, so it seems to be broken on windows at times.
I've found it's the other way round, double clicking no matter what speed you do doesn't work sometimes. F2 seems to work fine for me and remains working fine even when double clicking doesn't work.
Answer by Ben Wilkinson
Dec 15, 2010 at 11:27 AM
I have also found that if you create a new folder in project view (called "new folder" by default) then edit the name, then press enter, it just pops back to "new folder". Its very frustrating. I think this could be a bug. Im using windows vista and unity 3 pro and ran it a admin but still no luck.
I know it's old but if you are still having the problem then it's because you are not hitting Enter/Return after you have finished editing the name
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
4 People are following this question.
The name 'Joystick' does not denote a valid type ('not found')
Material doesn't have a color property '_Color'
How to import the object from server to unity
Setting Scroll View Width GUILayout