30 lines
941 B
C#
30 lines
941 B
C#
using UnityEngine;
|
|
|
|
namespace NBF
|
|
{
|
|
public partial class ConfigAssets : ScriptableObject
|
|
{
|
|
// public static string SavePath => $"Assets/ResRaw/Config/ConfigAssets.asset";
|
|
public static string SavePath => $"Assets/Resources/Config/ConfigAssets.asset";
|
|
private static ConfigAssets _inst;
|
|
|
|
public static ConfigAssets Instance => _inst;
|
|
|
|
public static void Init()
|
|
{
|
|
var asset = Resources.Load<ConfigAssets>("config/ConfigAssets");
|
|
if (asset != null)
|
|
{
|
|
asset.AssociationContexts();
|
|
_inst = asset;
|
|
}
|
|
|
|
// var assetProvider = NBC.Asset.Assets.LoadAsset<ConfigAssets>(SavePath);
|
|
// if (assetProvider != null && assetProvider.Asset is ConfigAssets asset)
|
|
// {
|
|
// asset.AssociationContexts();
|
|
// _inst = asset;
|
|
// }
|
|
}
|
|
}
|
|
} |