Custom Inspector serializes in 4.6 but not 5?

While writing a custom inspector I started to have a problem where while the inspector didn’t lose settings on play, it did lost settings when I switched scenes in editor mode. I decided I to create two separate projects (one in 4.6.9, one in 5.3.5), each with the exact same structure and scripts. I then did things in this order:

  1. Changed the “Hello” variable
  2. Pressed play, then stopped it.
  3. Open the “Main” scene, then open the “Test” scene again.

In 4.6 it keeps the changes while in 5.3 it doesn’t.
4.6.9 Example: https://dl.dropboxusercontent.com/u/85846965/ShareX/2016/06/2016-06-17_11-32-20.mp4
5.3.5 Example: https://dl.dropboxusercontent.com/u/85846965/ShareX/2016/06/2016-06-17_11-35-23.mp4

Here are the two scripts used:
Move: Move - Pastebin.com
MoveEditor: MoveEditor - Pastebin.com

Found the solution, have to use “EditorSceneManager.MarkSceneDirty” to save the scene once changes are made.

if (GUI.changed) {
    EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene());
}