From 32500ae76068e67da56907b2f52aa34736204511 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期三, 05 十二月 2018 16:27:35 +0800
Subject: [PATCH] 5232 子 【1.3.100】场景模型隐藏优化 / 【1.3.100】【前端】场景模型隐藏优化
---
Core/ResModule/InstanceResourcesLoader.cs | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/Core/ResModule/InstanceResourcesLoader.cs b/Core/ResModule/InstanceResourcesLoader.cs
index df3f2ce..08f8797 100644
--- a/Core/ResModule/InstanceResourcesLoader.cs
+++ b/Core/ResModule/InstanceResourcesLoader.cs
@@ -13,6 +13,35 @@
public static readonly string secondarySuffix = "Prefab_Secondary_";
public static readonly string handSuffix = "Prefab_Hand_";
public static readonly string wingSuffix = "Prefab_Wing_";
+ public static readonly string emptyJyName = "Prefab_Race_JY";
+
+ public static GameObject LoadEmptyJY()
+ {
+ GameObject _prefab = null;
+
+ if (AssetSource.mobFromEditor)
+ {
+#if UNITY_EDITOR
+ string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
+ "Mob/",
+ emptyJyName,
+ ".prefab");
+
+ _prefab = AssetDatabase.LoadAssetAtPath<GameObject>(_resourcePath);
+#endif
+ }
+ else
+ {
+ _prefab = AssetBundleUtility.Instance.Sync_LoadAsset("mob/prefab_race_jy", emptyJyName) as GameObject;
+ }
+
+ if (_prefab == null)
+ {
+ DebugEx.LogErrorFormat("InstanceResourcesLoader.LoadModel() => 鍔犺浇涓嶅埌璧勬簮: {0}/{1} ", "mob/prefab_race_jy", emptyJyName);
+ }
+
+ return _prefab;
+ }
public static GameObject LoadNpc(int id)
{
--
Gitblit v1.8.0