Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Le-Capitaine · Oct 06, 2014 at 08:39 PM · editorinspectorcustom class

Will renaming a Serializable class wipe its instances in the Inspector?

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.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image vexe · Oct 06, 2014 at 09:28 PM 0
Share

Your question title and body don't match. Just rename your class, most IDEs have basic refactoring/rena$$anonymous$$g functionalities. What IDE you're using? if any?

avatar image Le-Capitaine · Oct 07, 2014 at 07:22 AM 0
Share

I guess I'm using the built-in Unity IDE, if that's a thing.

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Landern · Oct 07, 2014 at 08:08 AM

I'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).

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Le-Capitaine · Oct 07, 2014 at 08:23 AM 0
Share

Will do and report back, thanks already.

avatar image Le-Capitaine · Oct 07, 2014 at 08:34 AM 0
Share

Wiped. Not the answer I like, but it is one.

avatar image Kiwasi · Oct 07, 2014 at 09:30 AM 1
Share

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.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

30 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Logic Problems using for loops 0 Answers

How to set a shared material in inspector? 0 Answers

How do I get the default scene GUI for a CustomEditor for RectTransform? 1 Answer

Is there an event being fired off when the Inspector is being resized? 1 Answer

How to get notification of moving a GameObject in the hierachy when editing the scene? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges