I've just lost - again - 1 hours of work because Unity crashed after I move a light! Why not saving the project in background every time we create a new gameobject or we change something significant. Just a check-box to enable this feature or not (in case some have projcets too big to be saved in background... Please!!! I'm fed up loosing time and I can't save every 5 min!!!
Why not? Apple-S (or Ctrl-S) is not hard or time-consuming. Not that autosave would be a bad thing - but it does seem that you're being mad at UT because you forgot to save.
lol I'm with StarManta here. I can understand you don't save for like 10 minutes but 1 hour... That's just looking for problems Especially you say "again". Don't you learn from your mistakes?
Yeah, i also think it's your fault But, any way, and Option is always good. Many softwares have this option, why not Unity? It has to be easy to implement, no? Basically a timer which calls the save function.
Mm, haven't you folks ever experienced being so sucked up into what you're doing that you forget to save? Anyhows, thumbs-up for auto-save! Every 15 minutes or something would be good.
Lol yeah it actually happened to me (I lost quite some work), but now I always save.... always I don't know, maybe it would be better to have an option that actually recovers the scene when it crashes. Some software have this option. I guess it involves more work but that'd be more useful.
Unity already has auto-save...any time you enter play mode, the current scene is backed up in the temp folder as "__EditModeScene". This can be moved and renamed if necessary, and used like any other ".unity" scene file. --Eric
I would love an auto-save aswell. The _editmodescene file does not always stay when Unity crashes, because the temp directory is removed. A simple copy/rename of the _editmodescene file "on play" would be enough. And not stored in the temp directory.
WTF!!! I was working on this scene and after having done a tons of changes, when I was so proud having finally found the right lightning I run my project : CRASH I got ballistic and almost destroyed my mouse (I love animals). But I remember, there is a thread where.... I come back here to find the trick about __editmodescene... got the file, load it... It WORKS!!! Oh my god! Thanks!!!
Those of you on a Mac can use AppleScript to do auto-saves (sort of). Unity doesn't appear to support AppleScript directly, but you can still control it via keystrokes. Something like this should work... use at your own risk, it hasn't been properly tested! Code (csharp): --Prompts user to save Unity every 10 minutes --Not tested, use at your own risk! set saveTime to 600 --number of seconds between saves tell application "Unity" to activate repeat while true delay saveTime tell application "System Events" to (name of processes) contains "Unity" set unityRunning to result if not unityRunning then tell me to quit --script quits if Unity not running activate me display dialog "Save Unity?" buttons {"Yes", "No"} default button 1 if the button returned of the result is "Yes" then tell application "Unity" to activate delay 0.2 tell application "System Events" to set frontApp to name of process 1 whose frontmost is true if frontApp is equal to "Unity" then tell application "System Events" to keystroke "s" using command down else tell application "Unity" to activate end if end repeat Plug the code into Apple's Script Editor and save it as an application. Click on it to launch both the auto-save script and Unity.
Unity 2.5.1 comes with a number of editor stability enhancements. Just go download the Unity Editor again for their website and it will be 2.5.1. But I agree with having more options, including Auto-save.
I actually searched google for unity auto-save. It has crashed few times already for me, and I hate losing work, even if its just 5 minutes of work. Drives me mad, and normally, after losing work, i tend go go berzerk and quit unity altogether for a few hours...
Here: Save this to a file named "AutoSave.cs" inside a folder called "Editor". To access Edit -> Project Settings -> AutoSave Be sure to read the disclaimer information to ensure that you are using it right! Code (csharp): using UnityEngine; using UnityEditor; using System.Collections.Generic; public class AutoSave : EditorWindow { public string relativeSavePath = "Assets/"; public string autoSaveFileName = "AutoSave"; public int secondsBetweenSaves = 600; [MenuItem("Edit/Project Settings/AutoSave")] static void Init() { // Get existing open window or if none, make a new one: AutoSave window = (AutoSave)EditorWindow.GetWindow(typeof(AutoSave)); window.minSize = new Vector2(225, 21); window.Show(); } float nextsave = 0; int timeLeft = 0; bool showDisclaimer = true; bool showDebug = true; bool toggleVisible = false; Vector2 winPosition = Vector2.zero; Vector2 disPosition = Vector2.zero; void OnGUI() { if (GUILayout.Button("Created By ReverieInteractive")) { Application.OpenURL("www.reverieinteractive.com"); } GUI.color = Color.white; GUI.contentColor = Color.white; winPosition = GUILayout.BeginScrollView(winPosition); if (showDisclaimer = EditorGUILayout.Foldout(showDisclaimer, "Disclaimer and Information")) { GUI.contentColor = Color.yellow; disPosition = GUILayout.BeginScrollView(disPosition); GUILayout.TextArea("IMPORTANT: The autosave will only save scenes if this window is OPEN and VISIBLE. If you hide this window, the autosave WILL NOT WORK!\n\n-------HELP INFO------\n\n\"Save Iteration\" - Seconds between saves (600 = saves every 10 min)\n\n\"File Name\" - The name of the AutoSave file (DONT name this the same as your opened scene)\n\n\"Relative Path\" - The path (from your projects folder up) to where the file is saved\n\n\"Apply Instantly\" - Applies settings and saves the scene without having to wait for the next save cycle"); GUILayout.EndScrollView(); } GUI.contentColor = Color.white; if (toggleVisible = EditorGUILayout.Foldout(toggleVisible, "AutoSave Settings")) { secondsBetweenSaves = EditorGUILayout.IntField("Save Iteration", secondsBetweenSaves); autoSaveFileName = EditorGUILayout.TextField("File Name", autoSaveFileName); relativeSavePath = EditorGUILayout.TextField("Relative Path", relativeSavePath); showDebug = EditorGUILayout.Toggle("Show Warning", showDebug); } if(GUILayout.Button("Apply Instantly")) { SaveScene(); } EditorGUILayout.LabelField("Next Save:", timeLeft + " Seconds"); GUILayout.EndScrollView(); } void OnInspectorUpdate() { timeLeft = (int)(nextsave - Time.realtimeSinceStartup); this.Repaint(); } void Update() { if (Time.realtimeSinceStartup >= nextsave) { SaveScene(); } } void SaveScene() { EditorApplication.SaveScene(relativeSavePath + autoSaveFileName + ".unity"); nextsave = Time.realtimeSinceStartup + secondsBetweenSaves; if(showDebug) Debug.LogWarning("Saved scene: " + relativeSavePath + autoSaveFileName + ".unity"); } }
lol. Well this is nice script because it quietly runs while you work. I used it all night last night and I gotta say I'm pretty pleased with how well its been working. Let me know how you like it of you end up using it! Jake
if you get blue screens you either need to check your hardware, its drivers or your security solution as only these 3 things can cause blue screens. If they primarily happen when using unity, I would commonly blame the gpu as it gets pushed rather hard
There are some bugs with that version of the autosaver.. I will try to get a better one uploaded to my site for anyone who is interested by the end of the weekend. Jake
To be fair, sometimes it's not Unity that's crashing, but rather that I've gone and done something boneheaded in my code that made it go into an endless loop. I guess the solution for that might be not just autosave, but a function that allows you to stop execution in the event of a runaway process. Vote up for autosave anyway.
Not sure if everybody allready has a proper auto-save solution. Just in case I would like to recommend our Auto Project Backup, which you can find in the asset store.
Well, it was Unity that crashed. The continuing lack of auto-save, plus the persistence of two different "Save" menu items (Save Scene vs. Save Project) continues to be a blight on the Unity UI to this day.
Very funny thread with people suggesting users become computers and autosave themselves every 10 minutes! Do they really think we don't have better things to do than typing save just in case. Unity is all about letting you focus on creating games so why doesn't it automate backing up too? The _EditModeScene tip is INCREDIBLY useful but unfortunately when I just did a search I had already restarted Unity and it must blitz it on startup. Take care with the new particle system as it has lost me work twice in as many weeks. All they need to do is check if this file hasn't been tidied up on a safe shutdown and offer to open it up. Not perfect but would really help. The computer is the thing that can do things systematically every n minutes - that's just what computers are for! This and a full Undo system should be fundamental to any good software package.
I agree (although its an old thread - its still the case in 3.5 today). The problem with relying on Cmd/Ctrl - S is that sometimes Unity screws up the scene file and if the temp directory is empty - you lose the scene (and often terain) completely. One cause of this is accidently hitting build in MonoDev instead of save (common if you use VS a lot! - personally I unmapped all build/run/debug key combos in Mono - but I only use it for Unity I use full VS for XNA/non-unity Windows coding) - doesn't always screw up scene, but does sometimes. A simple auto-save to a set folder (other than temp!) - preferably tailorable to number of online back-ups and interval - would be a boon for the annoyance of losing hours of work that has been manually saved often!