[refactor] 调整HybridCLR.Editor模块一些不规范的命名空间

main
walon 2023-10-09 15:39:32 +08:00
parent a77ed7369a
commit 69de3d733d
13 changed files with 81 additions and 62 deletions

View File

@ -6,13 +6,14 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEditor; using UnityEditor;
using System.Reflection; using System.Reflection;
using HybridCLR.Editor.Settings;
#if (UNITY_2020 || UNITY_2021) && UNITY_IOS #if (UNITY_2020 || UNITY_2021) && UNITY_IOS
using UnityEditor.Build; using UnityEditor.Build;
using UnityEditor.Callbacks; using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode; using UnityEditor.iOS.Xcode;
using UnityEngine; using UnityEngine;
namespace HybridCLR.Editor namespace HybridCLR.Editor.BuildProcessors
{ {
public static class AddLil2cppSourceCodeToXcodeproj2021OrOlder public static class AddLil2cppSourceCodeToXcodeproj2021OrOlder
{ {

View File

@ -8,7 +8,7 @@ using UnityEngine;
#if UNITY_2022_2_OR_NEWER && UNITY_IOS #if UNITY_2022_2_OR_NEWER && UNITY_IOS
namespace HybridCLR.Editor namespace HybridCLR.Editor.BuildProcessors
{ {
public static class AddLil2cppSourceCodeToXcodeproj2022OrNewer public static class AddLil2cppSourceCodeToXcodeproj2022OrNewer
{ {

View File

@ -1,4 +1,5 @@
using System; using HybridCLR.Editor.Settings;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;

View File

@ -3,6 +3,9 @@ using System;
using UnityEditor.Build; using UnityEditor.Build;
using UnityEditor.Build.Reporting; using UnityEditor.Build.Reporting;
namespace HybridCLR.Editor.BuildProcessors
{
public class MsvcStdextWorkaround : IPreprocessBuildWithReport public class MsvcStdextWorkaround : IPreprocessBuildWithReport
{ {
const string kWorkaroundFlag = "/D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS"; const string kWorkaroundFlag = "/D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS";
@ -24,5 +27,6 @@ public class MsvcStdextWorkaround : IPreprocessBuildWithReport
} }
} }
} }
}
#endif // UNITY_EDITOR #endif // UNITY_EDITOR

View File

@ -7,6 +7,7 @@ using UnityEngine;
using Debug = UnityEngine.Debug; using Debug = UnityEngine.Debug;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Linq; using System.Linq;
using HybridCLR.Editor.Settings;
namespace HybridCLR.Editor.Installer namespace HybridCLR.Editor.Installer
{ {

View File

@ -1,5 +1,6 @@
using dnlib.DotNet; using dnlib.DotNet;
using HybridCLR.Editor.Meta; using HybridCLR.Editor.Meta;
using HybridCLR.Editor.Settings;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;

View File

@ -3,6 +3,9 @@ using System;
using UnityEditor; using UnityEditor;
using UnityEditorInternal; using UnityEditorInternal;
namespace HybridCLR.Editor.Settings
{
/// <summary> /// <summary>
/// 监听编辑器状态,当编辑器重新 focus 时,重新加载实例,避免某些情景下 svn 、git 等外部修改了数据却无法同步的异常。 /// 监听编辑器状态,当编辑器重新 focus 时,重新加载实例,避免某些情景下 svn 、git 等外部修改了数据却无法同步的异常。
/// </summary> /// </summary>
@ -25,3 +28,5 @@ public static class EditorStatusWatcher
} }
} }
} }
}

View File

@ -4,7 +4,8 @@ using UnityEditor;
using UnityEditor.Presets; using UnityEditor.Presets;
using UnityEngine; using UnityEngine;
using UnityEngine.UIElements; using UnityEngine.UIElements;
namespace HybridCLR.Editor
namespace HybridCLR.Editor.Settings
{ {
public class HybridCLRSettingsProvider : SettingsProvider public class HybridCLRSettingsProvider : SettingsProvider
{ {

View File

@ -1,6 +1,7 @@
using UnityEditorInternal; using UnityEditorInternal;
using UnityEngine; using UnityEngine;
namespace HybridCLR.Editor
namespace HybridCLR.Editor.Settings
{ {
[FilePath("ProjectSettings/HybridCLRSettings.asset")] [FilePath("ProjectSettings/HybridCLRSettings.asset")]
public class HybridCLRSettings : ScriptableSingleton<HybridCLRSettings> public class HybridCLRSettings : ScriptableSingleton<HybridCLRSettings>

View File

@ -2,6 +2,8 @@ using HybridCLR.Editor.Installer;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
namespace HybridCLR.Editor.Settings
{
public static class MenuProvider public static class MenuProvider
{ {
@ -34,3 +36,4 @@ public static class MenuProvider
public static void OpenBugReport() => Application.OpenURL("https://hybridclr.doc.code-philosophy.com/docs/help/issue"); public static void OpenBugReport() => Application.OpenURL("https://hybridclr.doc.code-philosophy.com/docs/help/issue");
} }
}

View File

@ -5,7 +5,7 @@ using UnityEditor;
using UnityEditorInternal; using UnityEditorInternal;
using UnityEngine; using UnityEngine;
namespace HybridCLR.Editor namespace HybridCLR.Editor.Settings
{ {
public class ScriptableSingleton<T> : ScriptableObject where T : ScriptableObject public class ScriptableSingleton<T> : ScriptableObject where T : ScriptableObject
{ {

View File

@ -2,7 +2,7 @@ using UnityEditor;
using UnityEditor.Presets; using UnityEditor.Presets;
using UnityEngine; using UnityEngine;
namespace HybridCLR.Editor namespace HybridCLR.Editor.Settings
{ {
public class SettingsPresetReceiver : PresetSelectorReceiver public class SettingsPresetReceiver : PresetSelectorReceiver
{ {

View File

@ -5,6 +5,7 @@ using System.Linq;
using UnityEditor; using UnityEditor;
using UnityEditorInternal; using UnityEditorInternal;
using UnityEngine; using UnityEngine;
using HybridCLR.Editor.Settings;
namespace HybridCLR.Editor namespace HybridCLR.Editor