void OnSceneLoaded()
 {
     SaveMgr.Load();
 }
        void WindowFunc(int id)
        {
            GUI.backgroundColor = Color.black;
            GUILayout.BeginVertical("设置", GUI.skin.window);
            #region 设置
            GUILayout.BeginHorizontal();
            if (GUILayout.Button("读取存档"))
            {
                foreach (var m in models)
                {
                    GameObject.Destroy(m);
                }
                SaveMgr.Load();
            }
            if (GUILayout.Button("保存存档"))
            {
                SaveMgr.Save();
            }
            GUI.backgroundColor = Color.grey;
            isRayMove           = GUILayout.Toggle(isRayMove, $"启用射线移动({hotkey_move.Value})");
            openOutline         = GUILayout.Toggle(openOutline, "启用模型高亮");
            openSceneGizmo      = GUILayout.Toggle(openSceneGizmo, "启用方向指示器");
            GUI.backgroundColor = Color.black;
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("调节刻度", labelWidth);
            GUI.backgroundColor = Color.grey;
            nowSeletedMoveStep  = GUILayout.SelectionGrid(nowSeletedMoveStep, moveStepStrings, moveStepStrings.Length, GUILayout.Width(moveStepStrings.Length * 40));
            GUI.backgroundColor = Color.black;
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("粘贴板", labelWidth);
            if (models.Count > 0 && nowModel < models.Count)
            {
                if (GUILayout.Button("↑", GUILayout.Width(20)))
                {
                    pastePos = models[nowModel].transform.position;
                    pasteRot = models[nowModel].transform.localEulerAngles;
                    PasteScl = models[nowModel].transform.localScale;
                }
                if (GUILayout.Button("↓", GUILayout.Width(20)))
                {
                    models[nowModel].transform.position         = pastePos;
                    models[nowModel].transform.localEulerAngles = pasteRot;
                    models[nowModel].transform.localScale       = PasteScl;
                }
            }

            GUILayout.Label("位置:" + pastePos.ToString());
            GUILayout.Label("旋转:" + pasteRot.ToString());
            GUILayout.Label("缩放:" + PasteScl.ToString());
            GUILayout.EndHorizontal();
            #endregion
            GUILayout.EndVertical();
            GUILayout.Space(8);

            GUILayout.BeginHorizontal();
            #region 生成模型窗口
            GUILayout.BeginHorizontal("生成模型", GUI.skin.window, GUILayout.Width(300));
            modelCreateSV = GUILayout.BeginScrollView(modelCreateSV, GUILayout.Height(200));
            for (int i = 0; i < Prefabs.Count; i++)
            {
                GUILayout.BeginHorizontal();
                GUILayout.Label((i + 1).ToString(), GUILayout.Width(20));
                if (GUILayout.Button(Prefabs[i].name))
                {
                    GameObject go      = GameObject.Instantiate(Prefabs[i]);
                    var        renders = go.GetComponentsInChildren <Renderer>();
                    foreach (var r in renders)
                    {
                        var line = r.gameObject.AddComponent <CustomOutline>();
                        line.enabled = false;
                    }
                    go.name = Prefabs[i].name;
                    go.transform.localScale = new Vector3(0.167f, 0.167f, 0.167f);
                    models.Add(go);
                    RefreshCaseList();
                }
                GUILayout.EndHorizontal();
            }
            GUILayout.EndScrollView();
            GUILayout.EndHorizontal();
            #endregion
            GUILayout.Space(8);
            #region 场景内模型窗口
            GUILayout.BeginHorizontal("场景内模型", GUI.skin.window, GUILayout.Width(300));
            SceneModelSV = GUILayout.BeginScrollView(SceneModelSV, GUILayout.Height(200));
            for (int i = 0; i < models.Count; i++)
            {
                GUILayout.BeginHorizontal();
                GUILayout.Label((i + 1).ToString(), GUILayout.Width(20));
                if (nowModel == i)
                {
                    GUI.color = Color.green;
                }
                if (GUILayout.Button(models[i].name))
                {
                    CloseLine();
                    nowModel = i;
                }
                GUI.color = Color.white;
                //销毁物体
                if (GUILayout.Button("x", GUILayout.Width(20)))
                {
                    GameObject go = models[i];
                    models.Remove(go);
                    Destroy(go);
                    GUILayout.EndHorizontal();
                    if (nowModel == i && nowModel > 0)
                    {
                        nowModel--;
                    }
                    break;
                }
                GUILayout.EndHorizontal();
            }
            GUILayout.EndScrollView();
            GUILayout.EndHorizontal();
            #endregion
            GUILayout.EndHorizontal();
            GUILayout.Space(8);

            ContrlGUI();
            GUI.DragWindow();
        }