Skip to content

Commit 2ea862a

Browse files
authored
Update Storage.cs
1 parent f0b7fd1 commit 2ea862a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Storage.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
using System.Linq;
1+
using System.Linq;
22
using UnityEngine;
33

44
namespace ToolBox.Loader
55
{
66
public static class Storage
77
{
8-
private static ILoadable[] _assets = null;
8+
private static ScriptableObject[] _assets = null;
99

1010
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
1111
private static void Setup()
@@ -17,11 +17,10 @@ private static void Setup()
1717
#endif
1818
_assets = assets
1919
.Where(x => x is ILoadable)
20-
.Cast<ILoadable>()
2120
.ToArray();
2221
}
2322

24-
public static T Get<T>() where T : ILoadable
23+
public static T Get<T>() where T : ScriptableObject, ILoadable
2524
{
2625
for (int i = 0; i < _assets.Length; i++)
2726
if (_assets[i] is T asset)

0 commit comments

Comments
 (0)