title: Unity 5. Not saving scene before new scene opens
body: <p>Add this code to an Editor Window script, add an object through script then try to create a new scene. Why does unity not ask to save the scene before opening a new one?</p>
  
  <pre><code> Event e = Event.current;
           switch (e.type)
           {
               case EventType.keyDown:
                   {
                       if (e.keyCode == KeyCode.Escape)
                       {
                           GameObject b = new GameObject();
                           b.transform.position = new Vector3(0,0,0);
                       }
                       e.Use();    
                   }
                   break;
           }
  </code></pre>