Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit 4c5dd38

Browse files
committed
fix: убрал тот бесящий exception, при переключение на окно
1 parent 6f35cc0 commit 4c5dd38

File tree

13 files changed

+34
-19
lines changed

13 files changed

+34
-19
lines changed

Packages/com.nuclearband.sodatabase/Editor/DataNodeCreator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable enable
12
#if UNITY_EDITOR
23
using System;
34
using System.Collections.Generic;
@@ -65,4 +66,4 @@ private void Save(IEnumerable<Type> selection)
6566
}
6667
}
6768

68-
#endif
69+
#endif

Packages/com.nuclearband.sodatabase/Editor/ScriptableObjectDatabaseEditorWindow.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#if UNITY_EDITOR
1+
#nullable enable
2+
#if UNITY_EDITOR
23
using System;
34
using System.Collections.Generic;
45
using System.Linq;
@@ -148,6 +149,8 @@ protected override void OnBeginDrawEditors()
148149
return;
149150
}
150151

152+
if (MenuTree == null || MenuTree.Selection == null)
153+
return;
151154
var selected = MenuTree.Selection.FirstOrDefault();
152155
var toolbarHeight = MenuTree.Config.SearchToolbarHeight;
153156

@@ -191,4 +194,4 @@ private void AddDragHandles(OdinMenuItem menuItem)
191194
}
192195
}
193196
}
194-
#endif
197+
#endif

Packages/com.nuclearband.sodatabase/Runtime/DataNode.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Reflection;
1+
#nullable enable
2+
using System.Reflection;
23
using Newtonsoft.Json;
34
using Sirenix.OdinInspector;
45

@@ -19,4 +20,4 @@ protected virtual void OnEnable()
1920
}
2021
}
2122
}
22-
}
23+
}

Packages/com.nuclearband.sodatabase/Runtime/Holders/DataNodeHolder.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#if UNITY_EDITOR
1+
#nullable enable
2+
#if UNITY_EDITOR
23
using Sirenix.OdinInspector;
34
using UnityEditor;
45

@@ -46,4 +47,4 @@ protected override void Remove()
4647
}
4748
}
4849
}
49-
#endif
50+
#endif

Packages/com.nuclearband.sodatabase/Runtime/Holders/FolderHolder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#if UNITY_EDITOR
1+
#nullable enable
2+
#if UNITY_EDITOR
23
using UnityEditor;
34
#endif
45
using System.Collections.Generic;

Packages/com.nuclearband.sodatabase/Runtime/Holders/Holder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable enable
12
using Newtonsoft.Json;
23
using Sirenix.OdinInspector;
34
using UnityEngine;

Packages/com.nuclearband.sodatabase/Runtime/SODatabase.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#if UNITY_EDITOR
1+
#nullable enable
2+
#if UNITY_EDITOR
23
using UnityEditor;
34
#endif
45
using System;
@@ -135,4 +136,4 @@ static void LoadFolderHolder(FolderHolder folderHolder, string path)
135136
}
136137
}
137138
}
138-
}
139+
}

Packages/com.nuclearband.sodatabase/Runtime/SODatabaseAttributes.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable enable
12
using System;
23

34
namespace NuclearBand
@@ -7,4 +8,4 @@ public class ResetOnPlay : Attribute
78
{
89

910
}
10-
}
11+
}

Packages/com.nuclearband.sodatabase/Runtime/SODatabaseInternal.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable enable
12
#if UNITY_EDITOR
23
using System;
34
using System.Collections.Generic;
@@ -66,4 +67,4 @@ public static void RemoveFolder(string path)
6667
}
6768
}
6869
}
69-
#endif
70+
#endif

Packages/com.nuclearband.sodatabase/Runtime/SODatabaseSettings.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable enable
12
using System;
23
using Sirenix.OdinInspector;
34
using UnityEngine;
@@ -57,4 +58,4 @@ void Save()
5758
path = SavePath + "/";
5859
}
5960
}
60-
}
61+
}

0 commit comments

Comments
 (0)