Skip to content

Commit 004c470

Browse files
authored
Update Storage.cs
1 parent a201424 commit 004c470

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Runtime/Storage.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,18 @@ public static IEnumerable<T> GetAll<T>() where T : ScriptableObject, ILoadable
4848
return _assets.Where(a => a is T).Cast<T>();
4949
}
5050

51+
#if UNITY_EDITOR
5152
private static ScriptableObject[] GetAssets()
5253
{
53-
#if UNITY_EDITOR && ODIN_INSPECTOR
54+
#if ODIN_INSPECTOR
5455
var assets = AssetUtilities.GetAllAssetsOfType<ScriptableObject>().ToArray();
5556
#else
5657
var assets = Resources.FindObjectsOfTypeAll<ScriptableObject>();
5758
#endif
5859

5960
return assets;
6061
}
62+
#endif
6163
}
6264

6365
public interface ILoadable { }

0 commit comments

Comments
 (0)