public static void Initialize()
        {
            if (EditorApplication.isPlaying)
            {
                return;
            }

            SceneValidator.Init();
            EditorApplication.update += Update;
        }
 private static void Update()
 {
     // Detect when Unity Editor is going to Play mode
     if (EditorApplication.isPlayingOrWillChangePlaymode && !EditorApplication.isPlaying)
     {
         if (!SceneValidator.ValidateScene())
         {
             EditorApplication.isPlaying = false;
         }
     }
 }
        private void OnGUI()
        {
            var invalid = SceneValidator.GetNotValidObjects();

            foreach (var obj in invalid)
            {
                if (GUILayout.Button(obj.name))
                {
                    EditorGUIUtility.PingObject(obj);
                }
            }
        }