Can there please be an autosave?

I just lost 4 hours of work and threw together my own autosave editor script. Users should not have to do that, imo.

Everytime I read a years old thread about this, people write “I hit ctrl s all the time, you should also do that” and “just back up your project”. And yeah that is good for you, but I forget to save because I am immersed in what I am doing. And why is it that other media creation programs like VS or photoshop have an autosave feature if saving is solely the responsibility of the user? Knowing that there are others out there like me, I bet tens of thousands of Unity users have lost hours of work at least one time, leading to a loss of positive user experience that in the long run adds up.

3 Likes

Don’t worry, you’ll get better.

3 Likes

Please Unity, don’t include an auto-save feature. It will wreak havoc on experimentation you do not wish to save.

2 Likes

Then just add an opt out/opt in button.

2 Likes

And make everyone who is making a change they may not wish to save have to go and check the status of this button every time. No thanks. Just save manually when you are at a good save point.

The last thing the editor needs is the addition of more random hangs and freezes.

Just get into the habit of pushing Ctrl+S. It’s a useful habit to have for more than just Unity.

1 Like

Sorry, I have hard to believe, that within 4 hours of work, you haven’t though a single time, if maybe need to save.

Usually what’s happens is following. "Ok I check this now. Maybe save? No yet, it doesn’t work. Trying this now. Save? Not yet, still does work. 4 hours later … Save now? Oh darn, crashed :o "

Lets imagine you load now autosave.
Lets assume is 2 hrs back, if you lucky to have that far back.
You open, and then realize, nothing work as expected. And for worse, you don’t remember what did you changed. “I wish I had copy of starting point, before these changes”.

The thing is, many software don’t have auto saves for xyz reasons. Is user responsibility to save there and here in Unity, at the point, which is suitable.

This habit is must to learn, to be proficient.

Now imagine you have large project with autosave every 5 min. If constant freezes won’t be an issue, your certainly will be shocked, when you decide go back one hour. Then realizing, there is no autosave for that point, as it was override long time ago. Even having 10 copies few GB each won’t come to rescue at this point, as is only 50 min back, not full hour. Not to mention required space on disk.

Is entirely your matter to learn and take habit to save relevant data, ensuring you have backups, of older versions. And that not only Unity. Either is simple Tex file, or large project using 2d/3d/Unity, or any other software.

Similarly applies to versioning, which is highly recommended to learn asap.

Lesson learned.
All best.

2 Likes

Everybody is ignoring the option of there being a simple opt in button. And cool for you guys that you remember to save. I unfortunately have memory and concentration impairments which makes it hard to establish those habits, and as a countermeasure I wrote my own autosave anyways. I have been programming on and off for four years. When I hit ctrl-s I am used to only having to do so in the IDE and not in two separate windows.

If you save regularly as you all suggest, you would still have lost that old save point from 2 hours back.

Unity still saves the scene when you play (but deletes it on startup and it is not really meant as an autosave). The code is already there. All Unity needs to do after a crash is to say: “Hey, want to restore the scene that you just worked for hours on without saving?” if you hit yes then the scene is restored. I can’t fanthom how that would be a negative change whatsoever.

1 Like

No one is ignoring it. The opt in button is going to be one more thing to check to make sure it is off before I make changes. No thanks.

If you learned the habit for the IDE, I have confidence in your abilities to do the same for the Unity editor, regardless if you think you can’t. Writing your own autosave if you really want the feature is a good way to go anyways.

Version control

The devil is in the details. For example, lets say you crash with unsaved changes to a scene. You take a break, and when you get back you update your local version of the scene with changes checked into version control by someone else. Then you launch Unity. What should Unity load? Should it load the crashed version which is missing the changes you just picked up, or should it load the version you just got from version control? If Unity should behave differently, how does Unity know to do that?

If Unity should just load the crashed version, you may be unaware that when you save you are wiping out the other developer’s changes which may cause big problems if this goes unnoticed for a while.

1 Like

I wouldn’t want an auto save feature either, even though I have occasionally lost data by forgetting to save. I think if you wanted one, though, it would probably be really easy to add it yourself through editor scripting:

1 Like

I’m maybe in the minority here, but I personally love auto-save. I believe that the Addressables package (still in preview) bundled some auto-save code up with their package, which prompts for save every time I enter Play mode with unsaved changes. I thought that was kind of annoying at first, but it took about a day before I was fully on-board with auto-save. If/when Addressable decides to remove that functionality, I’ll go out and get this feature back into my project immediately.

As for this stiffling experimentation, I’ve never felt that at all. I do experimental stuff several times a day, simply reverting any changes via version control if I don’t like where it’s going. The obvious benefit to this is it reverts all changes, not just changes to a scene.

Anyway, I wouldn’t force anyone to have to adopt auto-save, but I wholeheartedly support an option to prompt to save when entering Play mode.

1 Like

The guy I responded to said that an autosave would have overwritten old scene data which could be problematic. Version control solves that problem as well.

No, because you get prompted with whether or not you want to load the recovered scene file. Unity already “autosaves” your scene by storing a copy in a temporary directory. It gets wiped when you reload the scene on startup. The prompt can simply include a timestamp of when the recovered scene file was saved and there will be no problem with version control.

also, this makes no sense because you only have to check the toggle if you have used it at some point. However, a simple prompt on startup after a crash is better anyways.

Edit: Thanks for your confidence in my memory, but I am not a fan of wasting work on learning habits when an autosave works more conveniently. I sorted it out for myself but I am sure that there are others out there who are frustrated at having lost their work.

1 Like

Yeah, I feel you. Just lost 5 hours work. I can’t imagine how such essential feature could be omitted. To all those who “don’t need autosave”, well, that’s quality of life feature. Don’t like it - don’t use it. What’s wrong with you people? It’s 2019 for god’s sake! The argument “You should not forget to save every x minutes” is just childish. Ok, by this logic we don’t need automatic backups in NAS backup software, we should remember to backup our files manually. We don’t need automatic updates - we should check Windows Update manually. No need for automatic defragmentation, antivirus scanning, memory management, etc, etc, etc - after all, IT SHOULDN’T BE HARD TO REMEMBER TO DO IT YOURSELF! That’s freaking lame. Even Word has it. I seriously starting to hate Unity and may be migrating to other engine after all, so they won’t see my money. THank you, rant over.

1 Like

Imagine comparing pressing ctrl+s every now and then with backup servers.

Unity is already slow. Last thing we need is autosave to eat even more CPU time.

  • You can already implement it with editor scripting

Auto save should be thing, its in every other complex software that is worth anything. To the people who dont want it (just like every other software package) turn it off. for the people who do, turn it on. Saying some people shouldn’t have this as an option is a little well, short sighted. So i vote for an auto save feature on play, An option to prompt for save. and when there has been a crashed and a restart, a choice to go back to the auto save version.

2 Likes

Here’s a solution that I think works for everybody:

  • Unity autosaves into a temp directory but doesn’t overwrite your main project save file.
  • When you open the editor (let’s say, after a crash), if Unity detects an autosave that is more recent than your most recent manual save, it says, “Would you like to load this autosave, from [timestamp]?”
  • If you say yes, it loads that file and that becomes your main project save file. If you say no, you load up your most recent manual save, which is what would happen currently.
  • Upon editor close, any temp autosave files that are OLDER than the most recent manual save would get deleted.

You can’t just autosave the project file. There is hardly anything in the main project files themselves. You’ve got to autosave all the prefabs, scenes, lightmaps, terrains, etc, which are normally done all independently of each other.

Plus that would be hell for any version control system, which is the industry standard way of managing and backing up projects. Version control systems don’t use timestamps for comparison (they look at the data in the actual files for changes instead), and may not update timestamps when updating the files with new data. You can easily end up in a situation where your autosave system is confused about what data is new vs old and end up wrecking your project, or have users repeatedly reverting other developer’s check-ins by accident because this thing keeps popping up every time they open Unity with bad suggestions.