Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by Metastable · Aug 25, 2015 at 12:19 AM · prefabgitcorrupted

How to restore a corrupted prefab from a VCS?

Unity decided to hang and required me to force kill it leaving a couple of prefabs corrupted and gray'd out. I have one under version control and would like to restore it. I have attempted to delete the prefab and meta file and then perform git checkout -f <file> which does bring the file back but unity still sees it as empty. I've also tried checking out an older version of the project with no change. Unfortunately the file is in binary format so I can't easily inspect what it's contents look like.

Any suggestions on how to get unity to see the prefab correctly?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by LessThanEpic · Aug 25, 2015 at 03:22 AM

Did you also "git checkout" the meta file? The meta file is what tells Unity that it's the same prefab, so if you don't get the right meta file Unity will consider the prefab to be a different prefab than before.

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 Metastable · Aug 25, 2015 at 03:36 AM 0
Share

Yes I also did that to no avail.

avatar image LessThanEpic · Aug 25, 2015 at 03:38 AM 0
Share

What do you mean "unity still sees it as empty"? Do you have a screen shot?

avatar image Metastable · Aug 25, 2015 at 03:43 AM 0
Share

I don't have a screenshot since I gave up and ended up remaking the prefabs. Basically Unity shows the prefab as gray rather then blue and does not give a drop down arrow. When I tried to move it into the scene nothing would happen. Attempting to instantiate the prefab at run time would either give an error that the prefab is null or give an invalid cast exception.

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

26 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

Related Questions

Random overrides in prefab instances 0 Answers

Working with UI as prefab, will change values outside the prefab 0 Answers

The Unity version determines the hierarchical order of the Scenes 0 Answers

Prefab sprite glitch,Prefab canvas glitch 1 Answer

Prefab script member values not correct 0 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