private static void HandleSceneSaveObject()
        {
            GameObject save = GameObject.Find("EditorPlusSceneObjectsSave." + SystemInfo.deviceUniqueIdentifier);

            if (save == null)
            {
                save                     = new GameObject("EditorPlusSceneObjectsSave." + SystemInfo.deviceUniqueIdentifier);
                sceneObjectsSave         = save.AddComponent <EditorPlusHistorySceneObjects>();
                sceneObjectsSave.ClearID = EditorPrefs.GetInt("EditorPlusHistory.clearID", 0);
                EditorUtility.SetDirty(sceneObjectsSave);
                if (historyUseSceneSaving)
                {
                    save.hideFlags = HideFlags.HideInHierarchy;
                }
                else
                {
                    save.hideFlags = HideFlags.HideAndDontSave;
                }

                sceneObjWaitingForSerializer = false;
            }
            else
            {
                if (historyUseSceneSaving)
                {
                    save.hideFlags = HideFlags.HideInHierarchy;
                }
                else
                {
                    save.hideFlags = HideFlags.HideAndDontSave;
                }

                sceneObjectsSave = save.GetComponent <EditorPlusHistorySceneObjects>();
                if (sceneObjectsSave.ClearID != -1 && sceneObjectsSave.ClearID != EditorPrefs.GetInt("EditorPlusHistory.clearID", 0))
                {
                    sceneObjectsSave.Clear();
                    sceneObjectsSave.ClearID = EditorPrefs.GetInt("EditorPlusHistory.clearID", 0);
                    EditorUtility.SetDirty(sceneObjectsSave);
                }
                if (sceneObjectsSave.ClearID == -1)
                {
                    sceneObjWaitingForSerializer = true;
                }
                else
                {
                    sceneObjWaitingForSerializer = false;
                }
            }
        }
 private static void HandleSceneSaveObject()
 {
     GameObject save = GameObject.Find("EditorPlusSceneObjectsSave." + SystemInfo.deviceUniqueIdentifier);
     if (save == null)
     {
         save = new GameObject("EditorPlusSceneObjectsSave." + SystemInfo.deviceUniqueIdentifier);
         sceneObjectsSave = save.AddComponent<EditorPlusHistorySceneObjects>();
         sceneObjectsSave.ClearID = EditorPrefs.GetInt("EditorPlusHistory.clearID", 0);
         EditorUtility.SetDirty(sceneObjectsSave);
         save.hideFlags = HideFlags.HideInHierarchy;
         sceneObjWaitingForSerializer = false;
     }
     else
     {
         sceneObjectsSave = save.GetComponent<EditorPlusHistorySceneObjects>();
         if (sceneObjectsSave.ClearID != -1 && sceneObjectsSave.ClearID != EditorPrefs.GetInt("EditorPlusHistory.clearID", 0))
         {
             sceneObjectsSave.Clear();
             sceneObjectsSave.ClearID = EditorPrefs.GetInt("EditorPlusHistory.clearID", 0);
             EditorUtility.SetDirty(sceneObjectsSave);
         }
         if(sceneObjectsSave.ClearID == -1)
         {
             sceneObjWaitingForSerializer = true;
         }
         else
         {
             sceneObjWaitingForSerializer = false;
         }
     }
 }