From 6e42b7d4f0370f9659aa397ff909aab477a3e676 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期三, 23 一月 2019 14:30:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into SpringFestival
---
Core/ResModule/ScriptableObjectLoader.cs | 35 +++++++++++++++++++++++++++++++++--
1 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/Core/ResModule/ScriptableObjectLoader.cs b/Core/ResModule/ScriptableObjectLoader.cs
index e0257cd..f33838c 100644
--- a/Core/ResModule/ScriptableObjectLoader.cs
+++ b/Core/ResModule/ScriptableObjectLoader.cs
@@ -22,6 +22,7 @@
public const string SoMapObjectGenerate_Suffix = "SoMapObjectGenerate_";
public const string SoTreasureMeridian_Suffix = "SoTreasureMeridian_";
public const string SoTreasure3D_Suffix = "SoTreasure3D_";
+ public const string SoDemonDungeon_Suffix = "SoDemonDungeon_";
public static SoMap LoadSoMapObjectGenerate(int mapID)
{
@@ -47,7 +48,7 @@
if (_config == null)
{
- DesignDebug.LogErrorFormat("ScriptableObjectLoader.LoadSoActor() => 鍔犺浇涓嶅埌璧勬簮: {0}.", mapID);
+ DebugEx.LogErrorFormat("ScriptableObjectLoader.LoadSoActor() => 鍔犺浇涓嶅埌璧勬簮: {0}.", mapID);
}
return _config;
@@ -79,7 +80,7 @@
if (_config == null)
{
- DesignDebug.LogErrorFormat("ScriptableObjectLoader.LoadSoActor() => 鍔犺浇涓嶅埌璧勬簮: {0}.", raceId);
+ DebugEx.LogErrorFormat("ScriptableObjectLoader.LoadSoActor() => 鍔犺浇涓嶅埌璧勬簮: {0}.", raceId);
}
return _config;
@@ -426,4 +427,34 @@
return config;
}
+
+ public static DemonDungeonScriptable LoadSoDemonDungeon(int _id)
+ {
+ DemonDungeonScriptable config = null;
+ if (AssetSource.refdataFromEditor)
+ {
+#if UNITY_EDITOR
+ var resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
+ "Refdata/ScriptableObject/SoDemonDungeon/",
+ SoDemonDungeon_Suffix,
+ _id,
+ ".asset");
+
+ config = AssetDatabase.LoadAssetAtPath<DemonDungeonScriptable>(resourcePath);
+#endif
+ }
+ else
+ {
+ var assetName = StringUtility.Contact(SoDemonDungeon_Suffix, _id);
+ var assetInfo = new AssetInfo(bundleName, assetName);
+ config = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as DemonDungeonScriptable;
+ }
+
+ if (config == null)
+ {
+ //Debug.LogErrorFormat("ScriptableObjectLoader.TreasureMeridianConfig() => 鍔犺浇涓嶅埌璧勬簮: {0}.", _id);
+ }
+
+ return config;
+ }
}
\ No newline at end of file
--
Gitblit v1.8.0