private static void Init()
        {
            NamespaceData data = GetData();

            if (data != null)
            {
                _isOn = data.IsOn;
            }
        }
Example #2
0
        private static bool IsOn()
        {
            NamespaceData data = GetData();

            if (data != null)
            {
                return(data.IsOn);
            }

            return(false);
        }
        private void OnGUI()
        {
            GUILayout.Label("命名空间名称");
            Rect rect = EditorGUILayout.GetControlRect(GUILayout.Width(200));

            _isOn = GUILayout.Toggle(_isOn, "是否开启插件");

            if (GUILayout.Button("完成", GUILayout.MaxWidth(100)))
            {
                NamespaceData data = new NamespaceData();
                data.IsOn = _isOn;

                ToolCacheManager.SaveCacheObject(PathManager.NameSpaceDataPath, data);
            }
        }