Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
5
Question by Bill 2 · Sep 25, 2010 at 12:27 PM · packageoverwrite

assets in package overwriting files they shouldn't

Hi all,

I posted this on the Unity forum and got one workaround but I was wondering if anyone here had another solution to what I would imagine is a fairly common problem?

Here is the thread:


Me: Hopefully a simple answer to this. Say I have Unity project A that contains ScriptA. I then use that script in Unity Project B, modify it and rename it ScriptB. When I export the assets in Project B as a package and try to import them back into Project A, Unity wants to overwrite Script A with script B even though I have made many changes to the file and changed the name. How can I break the connection to the original file so ScriptB is added to Project A?

Response: Create a new js file, copy paste all the content ?

Me: ok that worked, which is nice to have a workaround - thanks.

does anyone have a more elegant solution? The problems with the current workaround are:

a) it is difficult to know which files unity will want to add or replace without going through the whole export/import package first. b) when you create a new script you have to reapply it to all the game objects that utilise the original script.


Thanks in advance

Comment
Add comment · Show 4
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 Aristides · Apr 09, 2011 at 10:09 PM 0
Share

I'm having much the same problem... renamed scripts get overwritten with the prior name as if there's something in Unity that tokenizes the assets with the original name.

This posted workaround is helpful - for scripts. But the same thing is happening to my scenes and prefabs. I'm pretty irritated and frustrated.

I've gone to the trouble of rena$$anonymous$$g everything and resolving all the errors that creates in the scripts, but the overwrites are still happening on import into the the other project.

avatar image KeithT · Aug 29, 2012 at 03:56 PM 0
Share

Have the same problem as well. $$anonymous$$ost annoying, wasted several hours trying to find a work around for things other than scripts.

avatar image vexe · Apr 08, 2014 at 10:34 PM 0
Share

This is a fairly common problem.... I just ran into it - so annoying. I wish to see better workarounds.

avatar image better_walk_away · Jun 19, 2019 at 09:19 PM 0
Share

I have just run into this problem, hours of work has been waste, I have to reedit the scripts again...

2 Replies

· Add your reply
  • Sort: 
avatar image
5

Answer by MadDave · Oct 26, 2012 at 12:45 PM

When you renamed ScriptA to ScriptB, you should have deleted the ScriptA.meta file. The meta-file contains a unique id that allows unity to recognize the file even though the file name has changed.

This feature is actually very important; imagine you have a game with several scenes (levels) and all of them use some prefab. Now the prefab gets renamed - are all of your levels broken now? No, they are not - thanks to the unique id in the meta file all scenes will find the prefab again.

Comment
Add comment · 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
0

Answer by qjermyn · Jan 28, 2013 at 06:27 AM

Where can we find the exact .meta file to delete? I'm having this same problem with some different fbx files, prefabs, etc.

Comment
Add comment · Show 1 · 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 Seneral · May 25, 2015 at 05:21 PM 1
Share

Unitys Project panel hide them from you, just right click and 'Show in Explorer' where you see the corresponding meta files.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Please Help! Revert changes! 2 Answers

HELP!!! Scene File overwritten after import package 1 Answer

Accidentally overwritten scripts with imported package. 2 Answers

Error Compressing TAR when exporting package 2 Answers

Is it possible to import more than one asset package at the same time? 3 Answers


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