I have a class named MenuItem and just recently, I found out the namespace “MenuItem” is used by editor extensions such as Prototype, so I’m looking into changing it. I’d like to know if I’ll have to define all of my menus all over again.
1 Answer
1I’ve actually had good luck with this. Doing multiple conversions from UnityScript(JavaScript) to C# and copying the scene(originals done with scripts in UnityScript) to include my c# scripts, i have been able to keep the properties/fields with the same names between the scripts and replace the UnityScript version with the c# version and the values carried over. But your scripts may be different, i’m not sure. It would be wise to backup and give a go on the backup and not the main code base(or if you us SVN/GIT/ETC just revert if failure).
I just tried it the way Landern suggested and had no problem. Unity metadata is pretty resilient. You can rename scripts, change namespaces and even remove and return fields and the metadata will stay intact.
– Kiwasi
Your question title and body don't match. Just rename your class, most IDEs have basic refactoring/renaming functionalities. What IDE you're using? if any?
– vexeI guess I'm using the built-in Unity IDE, if that's a thing.
– Le-Capitaine