Skip to content

Commit 350f2ea

Browse files
committed
move editor classes to Editor namespace
1 parent a4e5ed2 commit 350f2ea

8 files changed

+13
-13
lines changed

Editor/EditorEvent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Reflection;
55
using UnityEditor;
66

7-
namespace SatorImaging.UnitySourceGenerator
7+
namespace SatorImaging.UnitySourceGenerator.Editor
88
{
99
public static class EditorEvent
1010
{

Editor/EditorExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Collections.Generic;
44
using UnityEditor;
55

6-
namespace SatorImaging.UnitySourceGenerator
6+
namespace SatorImaging.UnitySourceGenerator.Editor
77
{
88
public static class EditorExtension
99
{

Editor/ProjectSettingsData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using UnityEngine;
66

77

8-
namespace SatorImaging.UnitySourceGenerator
8+
namespace SatorImaging.UnitySourceGenerator.Editor
99
{
1010
public class ProjectSettingsData : ProjectSettingsSingleton<ProjectSettingsData>
1111
{

Editor/ProjectSettingsPanel.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using UnityEngine.UIElements;
1010

1111

12-
namespace SatorImaging.UnitySourceGenerator
12+
namespace SatorImaging.UnitySourceGenerator.Editor
1313
{
1414
public class ProjectSettingsPanel : SettingsProvider
1515
{
@@ -32,7 +32,7 @@ public ProjectSettingsPanel(string path, SettingsScope scopes, IEnumerable<strin
3232

3333

3434
Vector2 _scroll;
35-
Editor _cachedEditor;
35+
UnityEditor.Editor _cachedEditor;
3636

3737
public override void OnActivate(string searchContext, VisualElement rootElement)
3838
{
@@ -64,7 +64,7 @@ static void ShowWindow()
6464
public class USGWindow : EditorWindow
6565
{
6666
Vector2 _scroll;
67-
Editor _cachedEditor;
67+
UnityEditor.Editor _cachedEditor;
6868

6969
void OnEnable()
7070
{
@@ -111,7 +111,7 @@ void OnGUI()
111111

112112
// NOTE: class is reference type and reference type variable is "passed by value".
113113
// to take reference to newly created object, need `ref` chain.
114-
static void Wakeup(ref Editor cachedEditor)
114+
static void Wakeup(ref UnityEditor.Editor cachedEditor)
115115
{
116116
gui_emittersBtn ??= new(EditorGUIUtility.IconContent("d_icon dropdown"));
117117
gui_deleteBtn ??= new(EditorGUIUtility.IconContent("d_TreeEditor.Trash"));
@@ -166,12 +166,12 @@ static void Wakeup(ref Editor cachedEditor)
166166
static x => x,
167167
static x => USGUtility.GetAssetPathByType(x) ?? throw new Exception());
168168

169-
Editor.CreateCachedEditor(_settings, null, ref cachedEditor);
169+
UnityEditor.Editor.CreateCachedEditor(_settings, null, ref cachedEditor);
170170
}
171171

172172

173173
static bool _debugFoldout;
174-
static void DrawEditor(Editor cachedEditor, ref Vector2 currentScroll)
174+
static void DrawEditor(UnityEditor.Editor cachedEditor, ref Vector2 currentScroll)
175175
{
176176
var restoreLabelWidth = EditorGUIUtility.labelWidth;
177177
EditorGUIUtility.labelWidth = EditorGUIUtility.currentViewWidth * 0.2f;

Editor/ProjectSettingsSingleton.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using UnityEngine;
66

77

8-
namespace SatorImaging.UnitySourceGenerator
8+
namespace SatorImaging.UnitySourceGenerator.Editor
99
{
1010
///<summary>Polyfill for use in Unity 2019.</summary>
1111
///<remarks>Output path is hard-coded.</remarks>

Editor/USGEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
using UnityEditor.Compilation;
1212
using UnityEngine;
1313

14-
namespace SatorImaging.UnitySourceGenerator
14+
namespace SatorImaging.UnitySourceGenerator.Editor
1515
{
1616
/// <summary>
1717
/// > [!WARNING]

Editor/USGUtility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Runtime.CompilerServices;
88
using UnityEditor;
99

10-
namespace SatorImaging.UnitySourceGenerator
10+
namespace SatorImaging.UnitySourceGenerator.Editor
1111
{
1212
/// <summary>
1313
/// > [!WARNING]

Sample/SceneBuildIndexGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public static class {ENUM_NAME}Resolver
145145
public int callbackOrder => 0;
146146
public void OnPreprocessBuild(BuildReport report) => ForceUpdate();
147147

148-
static void ForceUpdate() => USGUtility.ForceGenerateByType(typeof(SceneBuildIndexGenerator), false);
148+
static void ForceUpdate() => Editor.USGUtility.ForceGenerateByType(typeof(SceneBuildIndexGenerator), false);
149149

150150
[InitializeOnLoadMethod]
151151
static void RegisterEvent()

0 commit comments

Comments
 (0)