- Home /
Script keeps changing its name
I made a script called itemPickup, with a lowercase I in front. Later on I realized that it should have been called ItemPickup. I tried to change the name but it kept on changing on its own back to itemPickup, causing errors.
I tried deleting the old script and re-writing it but it continues to change its name back to the lowercase I, itemPickup. I would prefer to be able to change its name permanently to ItemPickup, but if I must I guess its not that big a deal to just change the label inside the script to itemPickup.
If the script gets connstantly recreated, close every IDE, make sure there's only one Script in Unity with the desired name, open it and change it's name and ALSO search the whole project for that name without case sensitivity.
Answer by Connorc1 · Jan 28, 2019 at 11:47 PM
I had the same problem with my file named "NPCInventory" turning into "npcInventory". To fix this problem try deleting the file from within file explorer rather than the unity editor. I suspect the unity editor doesn't always delete items properly. You shouldn't need to delete the .meta file that came with it though if it doesn't work give that a try also. I hope this helps.