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
4
Question by robinking · Jan 19, 2011 at 05:00 PM · prefabeditor-scriptingpinklinkingscript-ready-to-use

My prefabs have all become completely unlinked!

I accidentally moved my Assets folder, then opened Unity (3). I saw my error and quickly closed Unity, moved the Assets folder back, then reopened Unity. However, it imported the whole project again and straight away everything was screwy... My materials were unlinked to my textures, my scripts were unlinked to my objects, and my prefabs were all unlinked to their instances.

I can relink the textures and scripts, but the prefabs are more difficult. There are a ton of instances of one prefab, and in the Hierachy they are all listed in a pinky colour. I cannot seem to relink them to the prefab, so I can't relink their texture using the prefab.

How do I fix this?

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

3 Replies

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

Answer by DaveA · Jan 19, 2011 at 05:20 PM

I wrote a script to help with this. It won't fix everything, but at least will reposition things where they were. Hope it helps:

http://www.unifycommunity.com/wiki/index.php?title=ReplaceSelection

Select the affected objects (you can multi-select), and use this, then choose the original prefab, then hit replace, it will reinstantiate them in place and correctly parented

Comment
Add comment · Show 4 · 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 robinking · Jan 19, 2011 at 05:51 PM 0
Share

OH $$anonymous$$Y GOD that is unbelievably fantastic! Thank you so much - I was dreading the thought of doing this by hand, and this is exactly what I needed. Not only that, but I've learned something about Editor scripts, AND about backing up (I had only been backing up the Assets folder!) YOU'RE A STAR.

avatar image DaveA · Jan 19, 2011 at 05:58 PM 0
Share

....(blush)....

avatar image BryanO · Dec 11, 2014 at 09:50 AM 0
Share

This website is gone. Is there an updated way for relinking a scene and project folder that are borked?

avatar image soxroxr BryanO · May 28, 2016 at 04:24 AM 0
Share

It just moved, it still exists - that's why stack exchange and similar sites always advise against linking for info. Here's the current link: http://wiki.unity3d.com/index.php/ReplaceSelection

avatar image
1

Answer by yoyo · Jan 20, 2011 at 07:45 AM

This won't help retroactively, but I have an editor script that lets you do a deep inspection of the scene, with an option to dump to a text file. You should of course back up your scene regularly(!), but if you also dump to text each time you back up, you not only have the backup, you can also figure out what's changed (by dumping the scene again and comparing the output).

You can find the script(s) here.

Comment
Add comment · Show 2 · 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 Art · Jan 20, 2011 at 07:47 AM 0
Share

Good stuff thank you

avatar image yoyo · Jan 20, 2011 at 11:57 PM 0
Share

p.s. Note that there are some limitations to that script, including an inability to drill into arrays. Not too hard to fix, and I'm open to other suggestions and feature requests.

avatar image
0

Answer by noeldc · Feb 09, 2014 at 03:35 PM

Why does this happen anyway? So frustrating. Everything keeps becoming unlinked for me.

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

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

2 People are following this question.

avatar image avatar image

Related Questions

Editing prefab fields from custom editor that are not automatically serialized 0 Answers

Assign prefabs to objects from custom editor 0 Answers

Mark gameobject field as changed from prefab 2 Answers

Can I generate prefab instances based on locators inside a 3d model file? 2 Answers

Text Labels For Prefabs in Hierarchy Turn Pink 2 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