com.wallstop-studios.unity-helpers 2.0.0-rc74.2 → 2.0.0-rc74.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/Utils/{ScriptableSingletonCreator.cs → ScriptableObjectSingletonCreator.cs} +3 -3
- package/Runtime/Utils/{ScriptableSingleton.cs → ScriptableObjectSingleton.cs} +2 -2
- package/package.json +2 -1
- /package/Editor/Utils/{ScriptableSingletonCreator.cs.meta → ScriptableObjectSingletonCreator.cs.meta} +0 -0
- /package/Runtime/Utils/{ScriptableSingleton.cs.meta → ScriptableObjectSingleton.cs.meta} +0 -0
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
using Object = UnityEngine.Object;
|
|
8
8
|
|
|
9
9
|
[InitializeOnLoad]
|
|
10
|
-
public static class
|
|
10
|
+
public static class ScriptableObjectSingletonCreator
|
|
11
11
|
{
|
|
12
|
-
static
|
|
12
|
+
static ScriptableObjectSingletonCreator()
|
|
13
13
|
{
|
|
14
14
|
bool anyCreated = false;
|
|
15
15
|
foreach (
|
|
16
16
|
Type derivedType in TypeCache.GetTypesDerivedFrom(
|
|
17
|
-
typeof(UnityHelpers.Utils.
|
|
17
|
+
typeof(UnityHelpers.Utils.ScriptableObjectSingleton<>)
|
|
18
18
|
)
|
|
19
19
|
)
|
|
20
20
|
{
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
using Sirenix.OdinInspector;
|
|
7
7
|
#endif
|
|
8
8
|
|
|
9
|
-
public abstract class
|
|
9
|
+
public abstract class ScriptableObjectSingleton<T> :
|
|
10
10
|
#if ODIN_INSPECTOR
|
|
11
11
|
SerializedScriptableObject
|
|
12
12
|
#else
|
|
13
13
|
ScriptableObject
|
|
14
14
|
#endif
|
|
15
|
-
where T :
|
|
15
|
+
where T : ScriptableObjectSingleton<T>
|
|
16
16
|
{
|
|
17
17
|
protected static readonly Lazy<T> LazyInstance = new(() =>
|
|
18
18
|
{
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|