Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Help! My script just deleted itself!

Discussion in 'Editor & General Support' started by JamesGameDev, Apr 21, 2018.

  1. JamesGameDev

    JamesGameDev

    Joined:
    Aug 19, 2016
    Posts:
    32
    Hi Comm-unity,

    It seems I'm in a bit of a pickle. I was working on a script last night, and my computer froze. I shut down my computer, rebooted it, and thought nothing of it. However this morning, when I attempted to open my project, it said that there were inconsistencies in the asset database, and it required a report. When I did that, I went to open my script, and it was just blank. I'm using Monodevelop. Any help would be much appreciated.

    - Tiger273
     
  2. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    Uhh, sounds like a scenario for having backups setup - like version control - would have helped a lot right now :)

    But anyway, check the recycle bin, sometimes deleted stuff (when you manually delete it) ends up there, but other than that I'm not sure what to try.
     
  3. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    You could check if Monodevelop kept some temporary file open somewhere. Also this might be worth a try if you still have a build somewhere: https://answers.unity.com/questions/302727/recover-script-instead-of-autosave.html

    Regardless of that, consider the 3 "B" of data processing: Backup, Backup and Backup. ;) If you keep working on your project long enough, it is not the question IF you will lose it, only when that will happen.
     
    MD_Reptile likes this.