private static void GetPathFromLocation() { ScriptsPathData data = ToolCacheManager.GetCacheObject <ScriptsPathData>(PathManager.StrangeIOCDataPath); m_ViewPath = data.ViewPath; m_MediatorPath = data.MediatorPath; }
private static void GetPathFromLocation() { ScriptsPathData data = ToolCacheManager.GetCacheObject <ScriptsPathData>(PathManager.FrameScriptDataPath + m_DataName); m_ViewPath = data.ViewPath; m_MediatorPath = data.MediatorPath; }
private void SavePathToLocation() { ScriptsPathData data = new ScriptsPathData(); data.ViewPath = m_ViewPath; data.MediatorPath = m_MediatorPath; ToolCacheManager.SaveCacheObject(PathManager.StrangeIOCDataPath, data); }
private void SavePathToLocation() { Directory.CreateDirectory(PathManager.FrameScriptDataPath); ScriptsPathData data = new ScriptsPathData(); data.ViewPath = m_ViewPath; data.MediatorPath = m_MediatorPath; ToolCacheManager.SaveCacheObject(PathManager.FrameScriptDataPath + m_DataName, data); }
private static void ChangeDefaultFont() { if (Selection.activeGameObject != null) { Text text = Selection.activeGameObject.Get <Text>(); if (text != null) { text.font = ToolCacheManager.GetFont(); } } }
private static void ChangeDefaultFont() { if (Selection.activeGameObject != null) { Text text = Selection.activeGameObject.Get <Text>(); if (text != null) { text.font = ToolCacheManager.GetCacheObject <FontData>(PathManager.FontDataPath).defaultFont; } } }
//保存数据到本地 public static void SaveDataToLocal() { EntitasData data = new EntitasData(); data.ViewPath = ViewPath; data.ServicePath = ServicePath; data.SystemPath = SystemPath; data.ServiceManagerPath = ServiceManagerPath; data.GameFeaturePath = GameFeaturePath; data.InputFeaturePath = InputFeaturePath; data.ViewFeaturePath = ViewFeaturePath; ToolCacheManager.SaveCacheObject(PathManager.EntitasDataPath, data); }
private void OnGUI() { EditorGUILayout.Space(); EditorGUILayout.LabelField("选择默认字体"); EditorGUILayout.Space(); m_font = (Font)EditorGUILayout.ObjectField(m_font, typeof(Font), true); EditorGUILayout.Space(); if (GUILayout.Button("确定")) { ToolCacheManager.SaveFont(m_font); window.Close(); } }
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); } }
//从本地读取数据 private static void ReadDataFromLocal() { EntitasData data = ToolCacheManager.GetCacheObject <EntitasData>(PathManager.EntitasDataPath); if (data != null) { ViewPath = data.ViewPath; ServicePath = data.ServicePath; SystemPath = data.SystemPath; ServiceManagerPath = data.ServiceManagerPath; GameFeaturePath = data.GameFeaturePath; InputFeaturePath = data.InputFeaturePath; ViewFeaturePath = data.ViewFeaturePath; } }
private void OnGUI() { EditorGUILayout.Space(); EditorGUILayout.LabelField("选择默认字体"); EditorGUILayout.Space(); m_font = (Font)EditorGUILayout.ObjectField(m_font, typeof(Font), true); EditorGUILayout.Space(); if (GUILayout.Button("确定")) { FontData data = new FontData(); data.defaultFont = m_font; ToolCacheManager.SaveCacheObject(PathManager.FontDataPath, data); window.Close(); } }
private void OnGUI() { GUILayout.Label("命名空间名称"); Rect rect = EditorGUILayout.GetControlRect(GUILayout.Width(200)); _name = EditorGUI.TextField(rect, _name); if (GUILayout.Button("完成", GUILayout.MaxWidth(100))) { NameSpaceData data = new NameSpaceData(); data.NameSpaceName = _name; ToolCacheManager.SaveCacheObject(PathManager.NameSpaceDataPath, data); _window.Close(); } }
public static void OpenWindow() { window = GetWindow(typeof(SetDefaultFont)); window.minSize = new Vector2(500, 300); m_font = ToolCacheManager.GetFont(); }
public static void OpenWindow() { window = GetWindow(typeof(SetDefaultFont)); window.minSize = new Vector2(500, 300); m_font = ToolCacheManager.GetCacheObject <FontData>(PathManager.FontDataPath).defaultFont; }
private static void Init() { _name = ToolCacheManager.GetCacheObject <NameSpaceData>(PathManager.NameSpaceDataPath).NameSpaceName; }
private static string GetNamespaceName() { return(ToolCacheManager.GetCacheObject <NameSpaceData>(PathManager.NameSpaceDataPath).NameSpaceName); }
public static NamespaceData GetData() { return(ToolCacheManager.GetCacheObject <NamespaceData>(PathManager.NameSpaceDataPath)); }