Search Unity

How to restore lost component data in inspector?

Discussion in 'Editor & General Support' started by eighto, May 8, 2019.

  1. eighto

    eighto

    Joined:
    Apr 27, 2013
    Posts:
    32
    I made a mistake which caused all my inspector data/references to be lost for one of my scripts. But if I open the .prefab file in wordpad I can see that the data I set on that script for that prefab is all still there. Is there a way I can restore all that data back onto the prefab?

    Gone in inspector:
    upload_2019-5-8_17-4-19.png

    But still here in .prefab file:
    upload_2019-5-8_17-3-48.png
     

    Attached Files:

  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    The normal way of fixing this is to simply revert the change using your version control system. I'm guessing that isn't an option in this case, so not sure what to suggest.
     
  3. eighto

    eighto

    Joined:
    Apr 27, 2013
    Posts:
    32
    Thanks, I got it fixed. I guess it was only showing that data in the text file because it hadn't been updated yet or something. I closed unity, discarded the file in sourcetree, then copied the text from the file from my last commit into my now empty prefab file and it's all back in the inspector.
     
    Joe-Censored likes this.