Auto save every five minutes?

Hi.

Most of us know the 3.4 ver. of Unity is slightly less stable than it really should but, for us/me there is nothing we/I can do about it. So I was thinking about the next best; an auto save function within Unity.

Since yesterday evening I was on a roll and had really fun creating my game but, as stupid as I am(I blame no other than myself) I had forgotten to save for hours, and of course the inevitable happens. Unity crashes and I almost burst into tears.

So after a night of banging my head against the wall I ask you. Is it possible to have a auto save function inside Unity so it saves every 5 minutes or so? Can that be done by scripts or…?

Thank you for your time.

OBSOLETE:

Please see that

http://www.unifycommunity.com/wiki/index.php?title=AutoSave

EDIT:

 using UnityEngine;
 using UnityEditor;
 
 [InitializeOnLoad]
 public class AutosaveOnRun
 {
     static AutosaveOnRun()
     {
         EditorApplication.playmodeStateChanged = () =>
         {
             if(EditorApplication.isPlayingOrWillChangePlaymode && !EditorApplication.isPlaying)
             {
                 Debug.Log("Auto-Saving scene before entering Play mode: " + EditorApplication.currentScene);
                 
                 EditorApplication.SaveScene();
                 EditorApplication.SaveAssets();
             }
         };
     }
 }

Unity auto-saves whenever you hit play. If it crashes, retrieve the __EditModeScene from the Temp folder (before you load Unity again) and rename it to whatever your scene file is called.

Just remember to use Ctrl+S?