This commit is contained in:
1 parent
ec91c434b6
commit
e0191abb1e
5 files changed
+36
-6
No files matched your search
@@ -120,6 +120,10 @@ namespace ShrinkApp
|
||||
[CreateAssetMenu(fileName = "ShrinkAppSettings", menuName = "ShrinkSDK/应用/应用设置")]
|
||||
public class ShrinkAppSettings : ScriptableObject
|
||||
{
|
||||
public const string PreferredResourcesPath =
|
||||
"GameAssets/Runtime/Data/ShrinkSDK/ShrinkAppSettings";
|
||||
public const string LegacyResourcesPath = "ShrinkAppSettings";
|
||||
|
||||
private static ShrinkAppSettings? _instance;
|
||||
|
||||
public static ShrinkAppSettings Instance
|
||||
@@ -129,7 +133,9 @@ namespace ShrinkApp
|
||||
if (_instance != null)
|
||||
return _instance;
|
||||
|
||||
_instance = Resources.Load<ShrinkAppSettings>("ShrinkAppSettings");
|
||||
_instance = Resources.Load<ShrinkAppSettings>(PreferredResourcesPath);
|
||||
if (!_instance)
|
||||
_instance = Resources.Load<ShrinkAppSettings>(LegacyResourcesPath);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (!_instance)
|
||||
|
||||
Reference in new issue
Block a user