File>Save scene not always saving all changes

Hi, Problem is when I’m using script with some values and click File>Save scene (CTRL+S). I have got few objects with that script and not all values I changed are actually saved. I can see it when I change scene from editor or in play mode. Hovewer it’s saving all values if I move an object a little. Isn’t that weird? I’m using 5.3.2f1 version.
If I made some changes on script and not save, then I change scene it’s not asking to save changes but If i move object it’s asking.

Problem was because that’s modyfing also script to look better in editor, just added

[System.Serializable] // added that line
public class myEditor : Editor {
// all stuff here
}

and everything is working fine.

Hi @Kamil1064
I have found that Unity sometimes decides that a scene isn’t “dirty” (modified) and doesn’t really save the scene - even in the newest versions. I made an editor utility called ReallySaveScene.cs that does this - and let’s you know when the scene would not be saved:

using UnityEngine ;
using System ;
using UnityEditor ;
using UnityEditor.SceneManagement ;
using UnityEngine.SceneManagement ;

public class ReallySaveScene : MonoBehaviour  {

[MenuItem ("File/ReallySaveScene")]

public static void saveScene()                                                             {
	Scene currentScene = SceneManager.GetActiveScene() ;
	if (!currentScene.isDirty) print("Scene was NOT marked dirty") ;
	EditorSceneManager.MarkSceneDirty(currentScene) ;
	if (!EditorSceneManager.SaveScene(currentScene)) print("WARNING: Scene Not Saved!!!") ; }