From 2627df6e76889371da1bd3e408913db96830bc32 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 04 六月 2025 19:54:21 +0800
Subject: [PATCH] 18 子 2D卡牌客户端搭建 / 2D卡牌客户端搭建 资源加载接口统一(遗漏
---
/dev/null | 12 ------
Main/ResModule/AudioLoader.cs | 44 +---------------------
Main/ResModule/ResManager.cs | 49 ++++++++++++++++++++++++
3 files changed, 51 insertions(+), 54 deletions(-)
diff --git a/Main/Component/UI/Common/UI3DModelExhibition.cs b/Main/Component/UI/Common/UI3DModelExhibition.cs
deleted file mode 100644
index dd539e6..0000000
--- a/Main/Component/UI/Common/UI3DModelExhibition.cs
+++ /dev/null
@@ -1,977 +0,0 @@
-锘�// //--------------------------------------------------------
-// // [Author]: 绗簩涓栫晫
-// // [ Date ]: Saturday, September 09, 2017
-// //--------------------------------------------------------
-// using vnxbqy.UI;
-// using System.Collections;
-// using System.Collections.Generic;
-
-// using UnityEngine;
-// using UnityEngine.UI;
-// using UnityStandardAssets.ImageEffects;
-
-// namespace vnxbqy.UI
-// {
-
-// public class UI3DModelExhibition : MonoBehaviour
-// {
-// [SerializeField] Transform m_PlayerShowPoint;
-// [SerializeField] Transform m_HorseShowPoint;
-// [SerializeField] Transform m_WingShowPoint;
-// [SerializeField] Transform m_NPCShowPoint;
-// [SerializeField] Transform m_DialogPoint;
-// [SerializeField] Transform m_EquipmentPoint;
-// [SerializeField] Camera m_ShowCamera;
-// [SerializeField] ColorCorrectionCurves m_CameraColor;
-
-// public bool interactable { get; set; }
-
-// UI3DShowHero playerModel = new UI3DShowHero();
-
-// int m_HorseModelId = 0;
-// GameObject horseModel = null;
-// public GameObject NpcModelHorse {
-// get { return horseModel; }
-// set { horseModel = value; }
-// }
-
-// int m_NPCId = 0;
-// GameObject npcModel = null;
-// SFXController m_NpcEffect;
-// readonly List<SFXController> m_BindEffectList = new List<SFXController>();
-// public GameObject NpcModelPet {
-// get { return npcModel; }
-// set { npcModel = value; }
-// }
-
-// int m_WingModelId = 0;
-// GameObject wingModel = null;
-
-// int m_EquipmentModelId = 0;
-// GameObject equipmentModel = null;
-
-// SFXController godWeaponEffect = null;
-
-// SFXController horsePetEffect = null;
-
-// Coroutine m_SwtichAnimationCoroutine = null;
-
-// bool isShowingPlayer = false;
-// bool isShowingHorse = false;
-// bool isShowingNPC = false;
-// bool isShowingPet = false;
-// bool isShowinEquipment = false;
-
-// EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
-// ReikiRootModel reikiRootModel { get { return ModelCenter.Instance.GetModel<ReikiRootModel>(); } }
-// PetModel petModel { get { return ModelCenter.Instance.GetModel<PetModel>(); } }
-
-// TitleModel titleModel { get { return ModelCenter.Instance.GetModel<TitleModel>(); } }
-
-// static UI3DModelExhibition m_Instance = null;
-// public static UI3DModelExhibition Instance {
-// get {
-// if (m_Instance == null)
-// {
-// CreateStage();
-// }
-
-// return m_Instance;
-// }
-// }
-
-// static UI3DModelExhibition m_InstanceClone1 = null;
-// public static UI3DModelExhibition InstanceClone1 {
-// get {
-// if (m_InstanceClone1 == null)
-// {
-// CreateCloneStageEx(ref m_InstanceClone1, 1);
-// }
-// return m_InstanceClone1;
-// }
-// }
-
-// static UI3DModelExhibition m_InstanceClone2 = null;
-// public static UI3DModelExhibition InstanceClone2
-// {
-// get
-// {
-// if (m_InstanceClone2 == null)
-// {
-// CreateCloneStageEx(ref m_InstanceClone2, 2);
-// }
-// return m_InstanceClone2;
-// }
-// }
-
-// static UI3DModelExhibition m_InstanceClone3 = null;
-// public static UI3DModelExhibition InstanceClone3
-// {
-// get
-// {
-// if (m_InstanceClone3 == null)
-// {
-// CreateCloneStageEx(ref m_InstanceClone3, 3);
-// }
-// return m_InstanceClone3;
-// }
-// }
-
-// static UI3DModelExhibition m_InstanceClone4 = null;
-// public static UI3DModelExhibition InstanceClone4
-// {
-// get
-// {
-// if (m_InstanceClone4 == null)
-// {
-// CreateCloneStageEx(ref m_InstanceClone4, 4);
-// }
-// return m_InstanceClone4;
-// }
-// }
-
-// static UI3DModelExhibition m_InstanceClone5 = null;
-// public static UI3DModelExhibition InstanceClone5
-// {
-// get
-// {
-// if (m_InstanceClone5 == null)
-// {
-// CreateCloneStageEx(ref m_InstanceClone5, 5);
-// }
-// return m_InstanceClone5;
-// }
-// }
-
-// static UI3DModelExhibition m_InstanceClone6 = null;
-// public static UI3DModelExhibition InstanceClone6
-// {
-// get
-// {
-// if (m_InstanceClone6 == null)
-// {
-// CreateCloneStageEx(ref m_InstanceClone6, 6);
-// }
-// return m_InstanceClone6;
-// }
-// }
-
-// static UI3DModelExhibition m_InstanceClone7 = null;
-// public static UI3DModelExhibition InstanceClone7
-// {
-// get
-// {
-// if (m_InstanceClone7 == null)
-// {
-// CreateCloneStageEx(ref m_InstanceClone7, 7);
-// }
-// return m_InstanceClone7;
-// }
-// }
-
-// static UI3DModelExhibition m_InstanceClone8 = null;
-// public static UI3DModelExhibition InstanceClone8
-// {
-// get
-// {
-// if (m_InstanceClone8 == null)
-// {
-// CreateCloneStageEx(ref m_InstanceClone8, 8);
-// }
-// return m_InstanceClone8;
-// }
-// }
-
-// static void CreateStage()
-// {
-// var prefab = BuiltInLoader.LoadPrefab("UI3DModelExhibitionStage");
-// var gameObject = GameObject.Instantiate(prefab);
-// m_Instance = gameObject.GetComponent<UI3DModelExhibition>();
-// m_Instance.transform.position = new Vector3(1000, 2000, 3000);
-// m_Instance.name = "UI3DModelExhibitionStage";
-// m_Instance.SetActive(true);
-// m_Instance.m_ShowCamera.enabled = false;
-// DontDestroyOnLoad(gameObject);
-// }
-
-// static void CreateCloneStage()
-// {
-// var prefab = BuiltInLoader.LoadPrefab("UI3DModelExhibitionStage");
-// var gameObject = GameObject.Instantiate(prefab);
-// m_InstanceClone1 = gameObject.GetComponent<UI3DModelExhibition>();
-// m_InstanceClone1.transform.position = new Vector3(2000, 4000, 5000);
-// m_InstanceClone1.name = "UI3DModelExhibitionStage(clone1)";
-// m_InstanceClone1.SetActive(true);
-// m_InstanceClone1.m_ShowCamera.enabled = false;
-// DontDestroyOnLoad(gameObject);
-// }
-
-// static void CreateCloneStageEx(ref UI3DModelExhibition instance, int index)
-// {
-// var prefab = BuiltInLoader.LoadPrefab("UI3DModelExhibitionStage");
-// var gameObject = GameObject.Instantiate(prefab);
-// instance = gameObject.GetComponent<UI3DModelExhibition>();
-// instance.transform.position = new Vector3(1000 + index * 200, 1000 + index * 200, 5000);
-// instance.name = "UI3DModelExhibitionStage(clone" + index + ")";
-// instance.SetActive(true);
-// instance.m_ShowCamera.enabled = false;
-// DontDestroyOnLoad(gameObject);
-// }
-
-// public string GetName()
-// {
-// return this.name;
-// }
-
-// public void ShowPlayerBodyEffect(int effectId, float scale = 1)
-// {
-// if (playerModel != null)
-// {
-// playerModel.ShowTitleBodyEffect(effectId, scale);
-// }
-// }
-
-// public void HidePlayerBodyEffect()
-// {
-// if (playerModel != null)
-// {
-// playerModel.HideTitleRootEffect();
-// }
-// }
-
-// //鐜╁鑷繁鐨刄I妯″瀷灞曠ず
-// public void ShowPlayer(RawImage rawImage, int job, bool isDialogue = false, float scale = 0)
-// {
-// var apperance = equipModel.GetAppearance();
-// var reikiRootEffectId = PlayerDatas.Instance.baseData.reikiRootEffectId;
-
-// var data = new UI3DPlayerExhibitionData
-// {
-// job = job,
-// fashionClothesId = apperance.fashionClothes,
-// fashionWeaponId = apperance.fashionWeapon,
-// fashionSecondaryId = apperance.fashionSecondary,
-// clothesId = apperance.clothes,
-// weaponId = apperance.weapon,
-// secondaryId = apperance.secondary,
-// wingsId = apperance.wings,
-// suitLevel = apperance.isSuit ? 1 : 0,
-// reikiRootEffectId = isDialogue ? 0 : reikiRootEffectId,
-// isDialogue = isDialogue,
-// equipLevel = PlayerDatas.Instance.baseData.suitLevel,
-// scale = scale,
-// titleID = PlayerDatas.Instance.baseData.TitleID
-
-// };
-
-// DrawPlayer(rawImage, data);
-// }
-
-// public void ShowPlayer(RawImage rawImage, UI3DPlayerExhibitionData data)
-// {
-// DrawPlayer(rawImage, data);
-// }
-
-// public void ShowSitDownPlayer(RawImage rawImage, int job)
-// {
-// ShowPlayer(rawImage, job, false);
-// if (playerModel != null)
-// {
-// playerModel.SitDown();
-// }
-// }
-
-// void DrawPlayer(RawImage rawImage, UI3DPlayerExhibitionData data)
-// {
-// StopShow();
-
-// var isDialogue = data.isDialogue;
-// var instance = playerModel.Show(data, isDialogue ? m_DialogPoint : m_PlayerShowPoint);
-// interactable = !isDialogue;
-
-// if (!data.keepRotation)
-// {
-// m_PlayerShowPoint.localEulerAngles = Vector3.zero;
-// }
-
-// if (isDialogue)
-// {
-// instance.transform.localPosition = GeneralDefine.heroDialogueOffset;
-// instance.transform.localEulerAngles = GeneralDefine.heroDialogueRotation;
-// if (data.scale <= 0)
-// instance.transform.localScale = GeneralDefine.heroDialogueScale * Vector3.one;
-// else
-// instance.transform.localScale = GeneralDefine.heroDialogueScale * data.scale * Vector3.one;
-// }
-// else
-// {
-// if (data.scale > 0)
-// instance.transform.localScale = data.scale * Vector3.one;
-// }
-
-// m_ShowCamera.enabled = true;
-// isShowingPlayer = true;
-// ResetCameraColor();
-
-// if (playerModel != null)
-// {
-// playerModel.StandUp();
-// }
-
-// BindGestureCatcher(rawImage, interactable);
-// }
-
-// public void ShowHourse(int modelId, RawImage rawImage)
-// {
-// StopShow();
-// m_ShowCamera.enabled = true;
-
-// var instance = UI3DModelFactory.LoadUIHorse(modelId);
-// if (instance == null)
-// {
-// return;
-// }
-
-// isShowingHorse = true;
-// interactable = true;
-
-// m_HorseModelId = modelId;
-// horseModel = instance;
-
-// m_HorseShowPoint.rotation = Quaternion.identity;
-
-// var modelConfig = ModelResConfig.Get(modelId);
-// var position = modelConfig.UIOffset;
-// var rotation = modelConfig.UIRotation;
-// instance.transform.SetParentEx(m_HorseShowPoint, position, rotation, modelConfig.UIScale);
-// instance.SetActive(true);
-// ResetCameraColor();
-
-// ShowNpcEffect(instance.transform, modelConfig.ResourcesName);
-
-// BindGestureCatcher(rawImage, interactable);
-// }
-
-// public void ShowHourse(UI3DHorsePetData data, RawImage rawImage)
-// {
-// StopShow();
-// m_ShowCamera.enabled = true;
-
-// var horseConfig = HorseConfig.Get(data.id);
-// if (horseConfig == null)
-// {
-// return;
-// }
-
-// var instance = UI3DModelFactory.LoadUIHorse(horseConfig.Model);
-// if (instance == null)
-// {
-// return;
-// }
-
-// isShowingHorse = true;
-// interactable = true;
-
-// m_HorseModelId = horseConfig.Model;
-// horseModel = instance;
-
-// m_HorseShowPoint.rotation = Quaternion.identity;
-
-// var modelConfig = ModelResConfig.Get(horseConfig.Model);
-// var position = modelConfig.UIOffset;
-// var rotation = modelConfig.UIRotation;
-// instance.transform.SetParentEx(m_HorseShowPoint, position, rotation, modelConfig.UIScale);
-// instance.SetActive(true);
-// ResetCameraColor();
-
-// ShowNpcEffect(instance.transform, modelConfig.ResourcesName);
-
-// if (horseModel && data.isRun)
-// {
-// var animator = horseModel.GetComponentInChildren<Animator>();
-// if (animator != null)
-// {
-// m_SwtichAnimationCoroutine = StartCoroutine(Co_SwitchAnimation(animator, GAStaticDefine.State_RunHash));
-// }
-// }
-
-// if (horseModel && data.skinIndex > 0)
-// {
-// var horsePetEffectId = petModel.GetPetHorseEffect(data.id, data.skinIndex);
-// if (horsePetEffectId != 0)
-// {
-// horsePetEffect = SFXPlayUtility.Instance.Play(horsePetEffectId, horseModel.transform);
-// if (horsePetEffect != null)
-// {
-// horsePetEffect.duration = 0f;
-// horsePetEffect.SetParticleEmissionRateOverTime(2f);
-// }
-// }
-// }
-
-// BindGestureCatcher(rawImage, interactable);
-// }
-
-// private GameObject ObjEquipment;
-// public void ShowEquipment(int modelId, Vector3 localEulerAngles, float scale, RawImage rawImage, bool interactable = false)
-// {
-// var instance = UI3DModelFactory.LoadUIWing(modelId);
-// ObjEquipment = instance;
-// if (instance == null)
-// {
-// return;
-// }
-
-// StopShow();
-
-// isShowinEquipment = true;
-// m_ShowCamera.enabled = true;
-// m_EquipmentModelId = modelId;
-// equipmentModel = instance;
-// instance.transform.SetParentEx(m_EquipmentPoint, Vector3.zero, localEulerAngles, Vector3.one * scale);
-// instance.SetActive(true);
-// ResetCameraColor();
-// BindGestureCatcher(rawImage, interactable);
-// }
-
-// public void ShowWing(int _modelId, RawImage _rawImage)
-// {
-// StopShow();
-
-// var instance = UI3DModelFactory.LoadUIWing(_modelId);
-// if (instance == null)
-// {
-// return;
-// }
-
-// m_ShowCamera.enabled = true;
-// interactable = true;
-
-// m_WingModelId = _modelId;
-// wingModel = instance;
-
-// m_WingShowPoint.rotation = Quaternion.identity;
-// var modelConfig = ModelResConfig.Get(_modelId);
-// var position = modelConfig.UIOffset;
-// var rotation = modelConfig.UIRotation;
-// instance.transform.SetParentEx(m_WingShowPoint, position, rotation, modelConfig.UIScale);
-
-// instance.SetActive(true);
-// ResetCameraColor();
-// var animator = instance.GetComponent<Animator>();
-// if (animator != null)
-// {
-// animator.Play("UI_Idle_Single");
-// }
-
-// BindGestureCatcher(_rawImage, interactable);
-// }
-
-// public void ShowNPC(RawImage rawImage, UI3DNPCExhibitionData data)
-// {
-// StopShow();
-// ResetCameraColor();
-// var config = NPCConfig.Get(data.npcId);
-// m_NPCId = data.npcId;
-// var job = 0;
-// if (config.MODE.Contains("A_Zs"))
-// {
-// job = 1;
-// }
-// else if (config.MODE.Contains("A_Fs"))
-// {
-// job = 2;
-// }
-
-// var offset = config.UIModeLOffset;
-// var eulerAngles = config.UIModelRotation;
-// var scale = Vector3.one * config.UIModeLProportion;
-
-// var isPlayer = job != 0;
-// if (isPlayer)
-// {
-// var instance = UI3DModelFactory.LoadUINPC(data.npcId);
-// if (instance == null)
-// {
-// Debug.LogFormat("鏃犳硶鑾峰緱npc妯″瀷璧勬簮锛宨d :{0}", data.npcId);
-// return;
-// }
-
-// instance.transform.SetParentEx(data.isDialogue ? m_DialogPoint : m_NPCShowPoint, offset, eulerAngles, scale);
-// npcModel = instance;
-// isShowingNPC = true;
-
-// var _configName = string.Empty;
-
-// if (job == 1)
-// {
-// _configName = config.MODE.Substring(config.MODE.LastIndexOf("A_"));
-// }
-// else if (job == 2)
-// {
-// _configName = config.MODE.Substring(config.MODE.LastIndexOf("A_"));
-// }
-
-// if (!string.IsNullOrEmpty(_configName))
-// {
-// var _renderer = instance.GetComponentInChildren<SkinnedMeshRenderer>();
-// if (_renderer)
-// {
-// MaterialLoader.Release(_renderer.material);
-
-// var _modelResConfig = ModelResConfig.GetClothesConfig(_configName);
-// if (_modelResConfig != null)
-// {
-// _renderer.material = MaterialLoader.LoadClothesMaterial(_modelResConfig.ID, false, false);
-// }
-// }
-// }
-
-// var ids = config.Equips.Split('|');
-// var weaponId = int.Parse(ids[0]);
-// var secondaryId = ids.Length > 1 ? int.Parse(ids[1]) : 0;
-// var wingId = ids.Length > 3 ? int.Parse(ids[3]) : 0;
-
-// playerModel.Show(instance, job, weaponId, wingId, secondaryId, m_PlayerShowPoint);
-// playerModel.StandUp();
-
-// m_PlayerShowPoint.localEulerAngles = Vector3.zero;
-// isShowingPlayer = true;
-
-// interactable = true;
-// m_ShowCamera.enabled = true;
-// BindGestureCatcher(rawImage, interactable);
-// }
-// else
-// {
-// ShowNPC(data.npcId, offset, eulerAngles, rawImage, data.gray, data.isDialogue);
-// }
-// }
-
-// public void ShowNPC(int _npcId, Vector3 _localEulerAngles, RawImage _rawImage, bool _gray = false, bool _isDialogue = false)
-// {
-// ShowNPC(_npcId, Vector3.zero, _localEulerAngles, _rawImage, _gray, _isDialogue);
-// }
-
-// public void ShowNPC(int _npcId, Vector3 _offset, Vector3 _localEulerAngles, RawImage _rawImage, bool _gray = false, bool _isDialogue = false)
-// {
-// StopShow();
-// m_ShowCamera.enabled = true;
-// m_NPCId = _npcId;
-
-// var instance = UI3DModelFactory.LoadUINPC(_npcId);
-// if (instance == null)
-// {
-// return;
-// }
-
-// interactable = !_isDialogue;
-// isShowingNPC = true;
-
-// if (!_isDialogue)
-// {
-// m_NPCShowPoint.localEulerAngles = _localEulerAngles;
-// }
-
-// npcModel = instance;
-// var config = NPCConfig.Get(_npcId);
-// instance.transform.SetParentEx(_isDialogue ? m_DialogPoint : m_NPCShowPoint, _offset, Quaternion.identity, Vector3.one * config.UIModeLProportion);
-// if (config.NPCEffect != 0)
-// {
-// var effectConfig = EffectConfig.Get(config.NPCEffect);
-// var parent = instance.transform;
-// if (!string.IsNullOrEmpty(effectConfig.nodeName))
-// {
-// parent = instance.transform.GetChildTransformDeeply(effectConfig.nodeName);
-// }
-// m_NpcEffect = SFXPlayUtility.Instance.PlayBattleEffect(config.NPCEffect, parent);
-// }
-
-// if (_isDialogue)
-// {
-// instance.transform.localEulerAngles = _localEulerAngles;
-// }
-
-// instance.SetActive(true);
-
-// if (npcModel)
-// {
-// ShowNpcEffect(npcModel.transform, config.MODE);
-// }
-
-// ResetCameraColor(_gray);
-// m_CameraColor.saturation = _gray ? 0.08f : 1f;
-
-// if (_npcId == 10104001)
-// {
-// _rawImage.SetActive(false);
-// UI3DModelShowSpecialNPC.Display(npcModel);
-// }
-// else
-// {
-// BindGestureCatcher(_rawImage, interactable);
-// }
-// }
-
-// public void ShowPet(UI3DHorsePetData data, RawImage _rawImage)
-// {
-// StopShow();
-// m_ShowCamera.enabled = true;
-// m_NPCId = data.id;
-
-// var instance = UI3DModelFactory.LoadUINPC(data.id);
-// if (instance == null)
-// {
-// return;
-// }
-
-// interactable = true;
-// isShowingPet = true;
-
-// m_NPCShowPoint.localEulerAngles = data.localEulerAngles;
-
-// npcModel = instance;
-// var config = NPCConfig.Get(data.id);
-// instance.transform.SetParentEx(m_NPCShowPoint, data.offset, Quaternion.identity, Vector3.one * config.UIModeLProportion);
-// if (config.NPCEffect != 0)
-// {
-// var effectConfig = EffectConfig.Get(config.NPCEffect);
-// var parent = instance.transform;
-// if (!string.IsNullOrEmpty(effectConfig.nodeName))
-// {
-// parent = instance.transform.GetChildTransformDeeply(effectConfig.nodeName);
-// }
-// m_NpcEffect = SFXPlayUtility.Instance.PlayBattleEffect(config.NPCEffect, parent);
-// }
-
-// instance.SetActive(true);
-
-// if (npcModel && data.skinIndex == 0)
-// {
-// ShowNpcEffect(npcModel.transform, config.MODE);
-// }
-// else
-// {
-// HideNpcEffect();
-// }
-
-// if (npcModel && data.isRun)
-// {
-// var animator = npcModel.GetComponentInChildren<Animator>();
-// if (animator != null)
-// {
-// m_SwtichAnimationCoroutine = StartCoroutine(Co_SwitchAnimation(animator, GAStaticDefine.State_RunHash));
-// }
-// }
-
-// if (npcModel && data.skinIndex > 0)
-// {
-// var horsePetEffectId = petModel.GetPetHorseEffect(data.id, data.skinIndex);
-// var effectNode = petModel.GetPetHorseEffectNode(data.id, data.skinIndex);
-// if (horsePetEffectId != 0)
-// {
-// var parent = instance.transform;
-// if (!string.IsNullOrEmpty(effectNode))
-// {
-// parent = npcModel.transform.GetChildTransformDeeply(effectNode);
-// }
-// horsePetEffect = SFXPlayUtility.Instance.Play(horsePetEffectId, parent);
-// if (horsePetEffect != null)
-// {
-// horsePetEffect.duration = 0f;
-// }
-// }
-// }
-
-// ResetCameraColor();
-
-// if (data.id == 10104001)
-// {
-// _rawImage.SetActive(false);
-// UI3DModelShowSpecialNPC.Display(npcModel);
-// }
-// else
-// {
-// BindGestureCatcher(_rawImage, interactable);
-// }
-// }
-
-// public void StopShow()
-// {
-// m_ShowCamera.enabled = false;
-
-// playerModel.Dispose();
-// isShowingPlayer = false;
-
-// if (m_SwtichAnimationCoroutine != null)
-// {
-// StopCoroutine(m_SwtichAnimationCoroutine);
-// m_SwtichAnimationCoroutine = null;
-// }
-
-// if (m_NPCId != 0)
-// {
-// var config = NPCConfig.Get(m_NPCId);
-// if (config != null)
-// {
-// var job = 0;
-// if (config.MODE.Contains("A_Zs"))
-// {
-// job = 1;
-// }
-// else if (config.MODE.Contains("A_Fs"))
-// {
-// job = 2;
-// }
-// if (job != 0)
-// {
-// var _renderer = npcModel.GetComponentInChildren<SkinnedMeshRenderer>();
-// if (_renderer)
-// {
-// MaterialLoader.Release(_renderer.material);
-// _renderer.material = _renderer.sharedMaterial = null;
-// _renderer.materials = _renderer.sharedMaterials = new Material[0];
-// }
-// }
-// }
-// }
-
-
-// if (horsePetEffect != null)
-// {
-// if (horseModel != null)
-// {
-// horsePetEffect.SetParticleEmissionRateOverTime(0f);
-
-// }
-// SFXPlayUtility.Instance.Release(horsePetEffect);
-// horsePetEffect = null;
-// }
-
-// if (npcModel != null)
-// {
-// npcModel.transform.localScale = Vector3.one;
-// if (m_NpcEffect != null)
-// {
-// SFXPlayUtility.Instance.Release(m_NpcEffect);
-// m_NpcEffect = null;
-// }
-
-// if (isShowingPet)
-// {
-// var animator = npcModel.GetComponentInChildren<Animator>();
-// if (animator != null)
-// {
-// animator.Play(GAStaticDefine.State_IdleHash, 0);
-// }
-// }
-
-// UI3DModelFactory.ReleaseUINPC(m_NPCId, npcModel);
-// npcModel = null;
-// }
-
-// m_NPCId = 0;
-// isShowingNPC = false;
-// isShowingPet = false;
-
-// if (horseModel != null)
-// {
-// horseModel.transform.localScale = Vector3.one;
-// var animator = horseModel.GetComponentInChildren<Animator>();
-// if (animator != null)
-// {
-// animator.Play(GAStaticDefine.State_IdleHash, 0);
-// }
-// UI3DModelFactory.ReleaseUIHourse(m_HorseModelId, horseModel);
-// horseModel = null;
-// }
-// m_HorseModelId = 0;
-// isShowingHorse = false;
-
-// if (wingModel != null)
-// {
-// wingModel.transform.localScale = Vector3.one;
-// UI3DModelFactory.ReleaseUIWing(m_WingModelId, wingModel);
-// wingModel = null;
-// }
-// m_WingModelId = 0;
-
-// if (equipmentModel != null)
-// {
-// UI3DModelFactory.ReleaseUIWing(m_EquipmentModelId, equipmentModel);
-// equipmentModel = null;
-// }
-// m_EquipmentModelId = 0;
-// isShowinEquipment = false;
-
-// if (godWeaponEffect != null)
-// {
-// SFXPlayUtility.Instance.Release(godWeaponEffect);
-// godWeaponEffect = null;
-// }
-
-// UI3DModelShowSpecialNPC.Dispose();
-// interactable = false;
-// }
-
-// public void ResetCameraColor(bool _enable = false)
-// {
-// m_CameraColor.enabled = _enable;
-// }
-
-// private void LateUpdate()
-// {
-// if (isShowinEquipment && ObjEquipment != null)
-// {
-// if (WindowCenter.Instance.IsOpen("FirstTimeRechargeWin"))
-// {
-// ObjEquipment.transform.Rotate(WindowCenter.Instance.Get<FirstTimeRechargeWin>().RotateVector * 1f, Space.Self);
-// }
-// if (WindowCenter.Instance.IsOpen("FirstChargeTrialWin"))
-// {
-// ObjEquipment.transform.Rotate(WindowCenter.Instance.Get<FirstChargeTrialWin>().RotateVector * 1f, Space.Self);
-// }
-// }
-// }
-
-// private void OnDrag3DModel(Vector2 deltaPosition)
-// {
-// if (!interactable)
-// {
-// return;
-// }
-
-// if (isShowingPlayer)
-// {
-// m_PlayerShowPoint.localEulerAngles += new Vector3(0, -deltaPosition.x, 0);
-// }
-
-// if (isShowingHorse)
-// {
-// m_HorseShowPoint.localEulerAngles += new Vector3(0, -deltaPosition.x, 0);
-// }
-
-// if (isShowingNPC)
-// {
-// m_NPCShowPoint.localEulerAngles += new Vector3(0, -deltaPosition.x, 0);
-// }
-
-
-// if (isShowingPet)
-// {
-// m_NPCShowPoint.localEulerAngles += new Vector3(0, -deltaPosition.x, 0);
-// }
-// }
-
-// private void ShowNpcEffect(Transform parent, string modelName)
-// {
-// HideNpcEffect();
-
-// var _boneList = ModelResConfig.GetBoneList(modelName);
-// var _effectlist = ModelResConfig.GetEffectList(modelName);
-
-// if (_boneList != null && _effectlist != null)
-// {
-// for (int i = 0; i < _boneList.Count; ++i)
-// {
-// if (_boneList[i].Equals("null"))
-// {
-// var _ctrl = SFXPlayUtility.Instance.PlayBattleEffect(_effectlist[i], parent);
-// m_BindEffectList.Add(_ctrl);
-// }
-// else
-// {
-
-// var _ctrl = SFXPlayUtility.Instance.PlayBattleEffect(_effectlist[i], parent.GetChildTransformDeeply(_boneList[i]));
-// m_BindEffectList.Add(_ctrl);
-// }
-// }
-// }
-// }
-
-// private void HideNpcEffect()
-// {
-// foreach (var _ctrl in m_BindEffectList)
-// {
-// SFXPlayUtility.Instance.Release(_ctrl);
-// }
-// m_BindEffectList.Clear();
-// }
-
-// private void BindGestureCatcher(RawImage rawImage, bool interable)
-// {
-// if (rawImage == null)
-// {
-// return;
-// }
-
-// var x = rawImage.rectTransform.rect.height * 4f / 3;
-// var y = rawImage.rectTransform.rect.height;
-// rawImage.rectTransform.sizeDelta = new Vector2(x, y);
-// rawImage.texture = m_ShowCamera.targetTexture;
-// rawImage.material = MaterialUtility.GetGUIRenderTextureMaterial();
-// rawImage.SetActive(true);
-
-// if (interable)
-// {
-// rawImage.raycastTarget = true;
-// var gestureCatcher = rawImage.AddMissingComponent<GestureCatcher>();
-// gestureCatcher.SetDragListener(OnDrag3DModel);
-// }
-// else
-// {
-// rawImage.raycastTarget = false;
-// }
-// }
-
-// IEnumerator Co_SwitchAnimation(Animator animator,int stateHash)
-// {
-// yield return null;
-// yield return null;
-// if (animator != null)
-// {
-// animator.Play(stateHash, 0);
-// }
-// }
-
-// }
-
-// public struct UI3DPlayerExhibitionData
-// {
-// public int job;
-// public int clothesId;
-// public int suitLevel;
-// public int weaponId;
-// public int wingsId;
-// public int secondaryId;
-// public int fashionClothesId;
-// public int fashionWeaponId;
-// public int fashionSecondaryId;
-// public int reikiRootEffectId;
-// public bool isDialogue;
-// public bool keepRotation;
-// public int equipLevel;
-// public float scale;
-// public int titleID;
-// }
-
-// public struct UI3DNPCExhibitionData
-// {
-// public int npcId;
-// public bool gray;
-// public bool isDialogue;
-// }
-
-
-// public struct UI3DHorsePetData
-// {
-// public int id;
-// public int skinIndex;
-// public bool isRun;
-// public Vector3 offset;
-// public Vector3 localEulerAngles;
-// }
-// }
-
-
-
diff --git a/Main/Component/UI/Common/UI3DModelExhibition.cs.meta b/Main/Component/UI/Common/UI3DModelExhibition.cs.meta
deleted file mode 100644
index 384d29b..0000000
--- a/Main/Component/UI/Common/UI3DModelExhibition.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 2490dca483bc10b4cbed43afd7e179c8
-timeCreated: 1504955255
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Main/Component/UI/Common/UI3DModelFactory.cs b/Main/Component/UI/Common/UI3DModelFactory.cs
deleted file mode 100644
index b024dd5..0000000
--- a/Main/Component/UI/Common/UI3DModelFactory.cs
+++ /dev/null
@@ -1,372 +0,0 @@
-锘�// using UnityEngine;
-// using System.Collections.Generic;
-// using System;
-
-// public class UI3DModelFactory
-// {
-// static UI3DModelFactory()
-// {
-// GlobalTimeEvent.Instance.minuteEvent += OnPerMinute;
-// }
-
-// public static GameObject LoadUINPC(int id)
-// {
-// if (!NPCConfig.Has(id))
-// {
-// return null;
-// }
-
-// try
-// {
-// var config = NPCConfig.Get(id);
-// var model = GameObjectPoolManager.Instance.RequestNpcGameObject(id);
-
-// if (!model && config.NPCType == (int)E_NpcType.Func)
-// {
-// model = GameObjectPoolManager.Instance.RequestDefaultFuncNpc();
-// }
-
-// if (!model)
-// {
-// return null;
-// }
-
-// var animator = model.GetComponent<Animator>();
-// if (animator != null)
-// {
-// var suffix = AnimatorControllerLoader.controllerUISuffix;
-// var _modeName = config.MODE;
-// if (config.MODE.StartsWith("A_Zs"))
-// {
-// _modeName = "A_Zs";
-// }
-// else if (config.MODE.StartsWith("A_Fs"))
-// {
-// _modeName = "A_Fs";
-// }
-// var animatorController = AnimatorControllerLoader.LoadMobController(suffix, _modeName);
-// if (animatorController != null)
-// {
-// animator.runtimeAnimatorController = animatorController;
-// }
-
-// var isDance = false;
-// if (config.NPCType == (int)E_NpcType.Func)
-// {
-// var clipInfos = animator.runtimeAnimatorController.animationClips;
-// foreach (var item in clipInfos)
-// {
-// if (item.name == "Idle2")
-// {
-// isDance = true;
-// break;
-// }
-// }
-// }
-
-// animator.enabled = true;
-// if (isDance)
-// {
-// animator.Play(GAStaticDefine.State_Dance);
-// }
-// else
-// {
-// animator.SetInteger(GAStaticDefine.Param_Action, GAStaticDefine.Act_Idle);
-// animator.Play(GAStaticDefine.State_IdleHash);
-// }
-// }
-
-// LayerUtility.SetLayer(model, LayerUtility.Monster, true);
-// return model;
-// }
-// catch (Exception e)
-// {
-// Debug.Log("LoadUINPC Error: " + e.Message);
-// return null;
-// }
-// }
-
-// public static void ReleaseUINPC(int id, GameObject model)
-// {
-// var animator = model.GetComponent<Animator>();
-// if (animator != null)
-// {
-// ResetRealmBossAnimator(id, animator);
-// animator.enabled = false;
-// }
-
-// if (model)
-// {
-// model.transform.localScale = Vector3.one;
-// }
-
-// var prefab = InstanceResourcesLoader.LoadNpcPrefab(id);
-// if (prefab)
-// {
-// GameObjectPoolManager.Instance.ReleaseGameObject(prefab, model);
-// }
-// else
-// {
-// GameObjectPoolManager.Instance.ReleaseDefaultFuncNPC(model);
-// }
-// }
-
-// private static void ResetRealmBossAnimator(int _id, Animator animator)
-// {
-// if (RealmLVUPTaskConfig.IsRealmBoss(_id))
-// {
-// var npcConfig = NPCConfig.Get(_id);
-// if (npcConfig != null)
-// {
-// var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, npcConfig.MODE);
-// if (runtimeController != null)
-// {
-// animator.runtimeAnimatorController = runtimeController;
-// }
-// }
-// }
-// }
-
-// public static GameObject LoadUIHorse(int id)
-// {
-// var prefab = InstanceResourcesLoader.LoadModelRes(id, false);
-// if (prefab == null)
-// {
-// return null;
-// }
-
-// var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// var model = pool.Request();
-
-// var animator = model.GetComponent<Animator>();
-// if (animator != null)
-// {
-// var config = ModelResConfig.Get(id);
-// var suffix = AnimatorControllerLoader.controllerUISuffix;
-// var animatorController = AnimatorControllerLoader.LoadMobController(suffix, config.ResourcesName);
-// if (animatorController != null)
-// {
-// animator.runtimeAnimatorController = animatorController;
-// }
-
-// animator.enabled = true;
-// animator.SetInteger(GAStaticDefine.Param_Action, GAStaticDefine.Act_Idle);
-// animator.Play(GAStaticDefine.State_IdleHash);
-// }
-
-// return model;
-// }
-
-// public static void ReleaseUIHourse(int id, GameObject model)
-// {
-// var prefab = InstanceResourcesLoader.LoadModelRes(id, false);
-// var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-
-// var animator = model.GetComponent<Animator>();
-// if (animator != null)
-// {
-// animator.enabled = false;
-// }
-
-// pool.Release(model);
-// }
-
-// static Dictionary<int, GameObject> treasureModels = new Dictionary<int, GameObject>();
-// static Dictionary<int, DateTime> treasureModelReleaseTimes = new Dictionary<int, DateTime>();
-
-// public static GameObject LoadUITreasure(int _id)
-// {
-// GameObject instance = null;
-// if (treasureModels.ContainsKey(_id))
-// {
-// instance = treasureModels[_id];
-// if (instance == null)
-// {
-// treasureModels.Remove(_id);
-// }
-// }
-
-// if (instance == null)
-// {
-// var config = TreasureConfig.Get(_id);
-// var folder = string.Empty;
-// switch ((TreasureCategory)config.Category)
-// {
-// case TreasureCategory.Human:
-// folder = "RenZu";
-// break;
-// case TreasureCategory.Demon:
-// folder = "MoZu";
-// break;
-// case TreasureCategory.Fairy:
-// folder = "XianZu";
-// break;
-// case TreasureCategory.King:
-// folder = "WangZhe";
-// break;
-// default:
-// break;
-// }
-
-// var prefab = UILoader.LoadTreasure(folder, config.Model);
-// instance = GameObject.Instantiate(prefab);
-// treasureModels[_id] = instance;
-
-// UILoader.UnLoadTreasure(folder, config.Model);
-// }
-
-// var animator = instance.GetComponent<Animator>();
-// if (animator != null)
-// {
-// animator.enabled = true;
-// }
-
-// LayerUtility.SetLayer(instance, LayerUtility.UILayer, true);
-// if (treasureModelReleaseTimes.ContainsKey(_id))
-// {
-// treasureModelReleaseTimes.Remove(_id);
-// }
-// return instance;
-// }
-
-// public static void ReleaseUITreasure(int _id, GameObject _model)
-// {
-// treasureModelReleaseTimes[_id] = DateTime.Now;
-// var animator = _model.GetComponent<Animator>();
-// if (animator != null)
-// {
-// animator.enabled = false;
-// }
-
-// _model.SetActive(false);
-// }
-
-// private static void OnPerMinute()
-// {
-// var keys = new List<int>(treasureModelReleaseTimes.Keys);
-// for (int i = 0; i < keys.Count; i++)
-// {
-// var key = keys[i];
-// var releaseTime = treasureModelReleaseTimes[key];
-// if ((DateTime.Now - releaseTime).TotalSeconds > Constants.UnUsedRes_Unload_Delay)
-// {
-// if (treasureModels.ContainsKey(key))
-// {
-// var model = treasureModels[key];
-// treasureModels.Remove(key);
-// if (model != null)
-// {
-// GameObject.Destroy(model);
-// }
-// }
-// }
-// }
-// }
-
-// //娉曞櫒
-// public static GameObject LoadUIFaqi(string pathName, string modelName)
-// {
-// var prefab = UILoader.LoadFaqi(pathName, modelName);
-// var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// var model = pool.Request();
-
-// var animator = model.GetComponent<Animator>();
-// if (animator != null)
-// {
-// animator.enabled = true;
-// }
-
-// LayerUtility.SetLayer(model, LayerUtility.UILayer, true);
-// return model;
-// }
-
-// public static GameObject LoadUIGodWeapon(int _type)
-// {
-// var prefab = UILoader.LoadGodWeapon(GeneralDefine.godWeaponMobs[_type]);
-// var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// var model = pool.Request();
-
-// var animator = model.GetComponent<Animator>();
-// if (animator != null)
-// {
-// animator.enabled = true;
-// }
-
-// LayerUtility.SetLayer(model, LayerUtility.UILayer, true);
-// return model;
-// }
-
-// public static void ReleaseUIGodWeapon(int _type, GameObject _model)
-// {
-// if (!GameObjectPoolManager.IsValid())
-// {
-// return;
-// }
-// if (!GeneralDefine.godWeaponMobs.ContainsKey(_type))
-// {
-// return;
-// }
-// var prefab = UILoader.LoadGodWeapon(GeneralDefine.godWeaponMobs[_type]);
-// var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-
-// var animator = _model.GetComponent<Animator>();
-// if (animator != null)
-// {
-// animator.enabled = false;
-// }
-
-// pool.Release(_model);
-// }
-
-// public static void ReleaseUIFaqi(string pathName, string modelName, GameObject _model)
-// {
-// if (!GameObjectPoolManager.IsValid())
-// {
-// return;
-// }
-
-// var prefab = UILoader.LoadFaqi(pathName, modelName);
-// var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-
-// var animator = _model.GetComponent<Animator>();
-// if (animator != null)
-// {
-// animator.enabled = false;
-// }
-
-// pool.Release(_model);
-// }
-
-
-
-// public static GameObject LoadUIWing(int _id)
-// {
-// var prefab = InstanceResourcesLoader.LoadModelRes(_id, false);
-// if (prefab == null)
-// {
-// return null;
-// }
-
-// var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// var model = pool.Request();
-// var animator = model.GetComponent<Animator>();
-// if (animator != null)
-// {
-// animator.enabled = true;
-// }
-// return model;
-// }
-
-// public static void ReleaseUIWing(int _id, GameObject _model)
-// {
-// var prefab = InstanceResourcesLoader.LoadModelRes(_id, false);
-// var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// var animator = _model.GetComponent<Animator>();
-// if (animator != null)
-// {
-// animator.enabled = false;
-// }
-
-// pool.Release(_model);
-// }
-// }
diff --git a/Main/Component/UI/Common/UI3DModelFactory.cs.meta b/Main/Component/UI/Common/UI3DModelFactory.cs.meta
deleted file mode 100644
index a3cafb3..0000000
--- a/Main/Component/UI/Common/UI3DModelFactory.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 71d6de4139acab94aaf4efa6c9fc358f
-timeCreated: 1504955834
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Main/Component/UI/Common/UI3DShowHero.cs b/Main/Component/UI/Common/UI3DShowHero.cs
deleted file mode 100644
index b3d2efe..0000000
--- a/Main/Component/UI/Common/UI3DShowHero.cs
+++ /dev/null
@@ -1,828 +0,0 @@
-锘�// //--------------------------------------------------------
-// // [Author]: 绗簩涓栫晫
-// // [ Date ]: Friday, September 22, 2017
-// //--------------------------------------------------------
-// using UnityEngine;
-
-// using System.Collections.Generic;
-// using LitJson;
-
-// namespace vnxbqy.UI
-// {
-
-// public class UI3DShowHero
-// {
-// int weaponId;
-// int clothesId;
-// int wingsId;
-// int secondaryId;
-// int extraSecondaryId;
-// int job;
-
-// GameObject weaponModel;
-// GameObject clothesModel;
-// GameObject wingsModel;
-// GameObject secondaryModel;
-// GameObject extraSecondaryModel;
-
-// Animator wingsAnimator;
-// Animator clothesAnimator;
-// RuntimeAnimatorController cacheClothedAC;
-
-// Transform showPoint;
-// List<SFXController> godWeaponSFXList = new List<SFXController>();
-
-// GameObject reikiRootShowPoint = null;
-// SFXController reikiRootEffect = null; //寮哄寲澶у笀鐗规晥
-// SFXController titleRootEffect = null; //绉板彿鍏ㄨ韩鐗规晥
-
-// bool isSuit = false;
-// public GameObject Show(UI3DPlayerExhibitionData data, Transform showPoint)
-// {
-// this.showPoint = showPoint;
-// this.job = data.job;
-
-// var clothes = data.fashionClothesId > 0 ? data.fashionClothesId : data.clothesId;
-// isSuit = data.suitLevel > 0;
-// var weaponId = data.fashionWeaponId > 0 ? data.fashionWeaponId : data.weaponId;
-// var wingsId = data.wingsId;
-// var secondaryId = data.fashionSecondaryId > 0 ? data.fashionSecondaryId : data.secondaryId;
-
-// var jobConfig = JobSetupConfig.Get(job);
-
-// var clothesResId = 0;
-// if (clothes == 0)
-// {
-// clothesResId = jobConfig.BaseEquip[0];
-// }
-// else
-// {
-// var item = ItemConfig.Get(clothes);
-// clothesResId = item == null ? clothesResId = jobConfig.BaseEquip[0] : item.ChangeOrd;
-// }
-// PutOnClothes(job, clothesResId);
-
-// var weaponResId = 0;
-// if (weaponId == 0)
-// {
-// weaponResId = jobConfig.BaseEquip[1];
-// }
-// else
-// {
-// var item = ItemConfig.Get(weaponId);
-// weaponResId = item == null ? weaponResId = jobConfig.BaseEquip[1] : item.ChangeOrd;
-// }
-// PutOnWeapon(job, weaponResId);
-
-// var secondaryResId = 0;
-// if (secondaryId == 0)
-// {
-// if (data.fashionClothesId == 0)
-// {
-// if (this.job == 1)
-// {
-// secondaryResId = ModelResConfig.GetHandByClothesID(clothesId);
-// }
-// else if (this.job == 2)
-// {
-// secondaryResId = jobConfig.BaseEquip[2];
-// }
-// }
-// }
-// else
-// {
-// var item = ItemConfig.Get(secondaryId);
-// if (item != null)
-// {
-// secondaryResId = item.ChangeOrd;
-// }
-// }
-
-// if (secondaryResId != 0)
-// {
-// PutOnSecondary(job, secondaryResId);
-// }
-
-// var extraSecondaryId = 0;
-// if (data.job == 1)
-// {
-// extraSecondaryId = ModelResConfig.GetHandByClothesID(0);
-// if (data.fashionClothesId > 0)
-// {
-// var _item = ItemConfig.Get(data.fashionClothesId);
-// if (_item != null)
-// {
-// extraSecondaryId = ModelResConfig.GetHandByClothesID(_item.ChangeOrd);
-// }
-// }
-// else if (data.clothesId > 0)
-// {
-// var _item = ItemConfig.Get(data.clothesId);
-// if (_item != null)
-// {
-// extraSecondaryId = ModelResConfig.GetHandByClothesID(_item.ChangeOrd);
-// }
-// }
-
-// if (secondaryResId == 0
-// || (data.fashionClothesId != 0 && data.fashionSecondaryId > 0)
-// || (data.fashionClothesId == 0 && data.fashionSecondaryId > 0))
-// {
-// PutOnExtraSecondary(job, extraSecondaryId);
-// }
-// }
-
-// var wingsResId = 0;
-// if (wingsId != 0)
-// {
-// var item = ItemConfig.Get(wingsId);
-// wingsResId = item == null ? 0 : item.ChangeOrd;
-// }
-
-// PutOnWing(wingsResId);
-// ShowBodyEffect(data);
-
-// LoadClothesEffect();
-// return clothesModel;
-// }
-
-// public GameObject Show(GameObject clothesModel, int job, int weaponResId, int wingsResId, int secondaryResId, Transform showPoint)
-// {
-// this.showPoint = showPoint;
-// this.job = job;
-// this.clothesModel = clothesModel;
-// SwitchMaterial(false);
-// PutOnWeapon(job, weaponResId);
-// PutOnSecondary(job, secondaryResId);
-// PutOnWing(wingsResId);
-// LoadClothesEffect();
-// return clothesModel;
-// }
-
-// public void Dispose()
-// {
-// GameObject prefab = null;
-// GameObjectPoolManager.GameObjectPool pool = null;
-
-// HideWeaponEffect();
-// HideSecondaryEffect();
-// HideSuitEffect();
-// HideReikiRootEffect();
-// HideTitleRootEffect();
-
-// if (weaponId != 0)
-// {
-// prefab = InstanceResourcesLoader.LoadModelRes(weaponId);
-// if (prefab)
-// {
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// pool.Release(weaponModel);
-// }
-// weaponModel = null;
-// }
-
-// if (secondaryId != 0)
-// {
-// prefab = InstanceResourcesLoader.LoadModelRes(secondaryId);
-// if (prefab)
-// {
-// if (secondaryModel)
-// {
-// secondaryModel.SetActive(true);
-// }
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// pool.Release(secondaryModel);
-// }
-// secondaryModel = null;
-// }
-
-// if (extraSecondaryId != 0)
-// {
-// prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
-// if (prefab)
-// {
-// if (extraSecondaryModel)
-// {
-// extraSecondaryModel.SetActive(true);
-// }
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// pool.Release(extraSecondaryModel);
-// }
-// extraSecondaryModel = null;
-// }
-
-// if (wingsId != 0)
-// {
-// prefab = InstanceResourcesLoader.LoadModelRes(wingsId);
-// if (prefab)
-// {
-// wingsModel.transform.localScale = Vector3.one;
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// pool.Release(wingsModel);
-// }
-// wingsModel = null;
-// wingsAnimator = null;
-// }
-
-// if (clothesId != 0)
-// {
-// if (clothesModel)
-// {
-// var smRenderer = clothesModel.GetComponentInChildren<SkinnedMeshRenderer>();
-// if (smRenderer != null)
-// {
-// MaterialLoader.Release(smRenderer.material);
-// smRenderer.material = smRenderer.sharedMaterial = null;
-// smRenderer.materials = smRenderer.sharedMaterials = new Material[0];
-// }
-// }
-
-// prefab = InstanceResourcesLoader.LoadModelRes(clothesId, true);
-// if (prefab)
-// {
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// pool.Release(clothesModel);
-// }
-// clothesModel = null;
-// if (clothesAnimator)
-// {
-// if (cacheClothedAC)
-// {
-// clothesAnimator.runtimeAnimatorController = cacheClothedAC;
-// cacheClothedAC = null;
-// }
-// clothesAnimator.enabled = false;
-// clothesAnimator = null;
-// }
-// }
-
-// clothesModel = null;
-// clothesId = 0;
-// weaponId = 0;
-// wingsId = 0;
-// secondaryId = 0;
-// extraSecondaryId = 0;
-// }
-
-// public void StandUp()
-// {
-// if (clothesModel != null)
-// {
-// var animator = clothesModel.GetComponent<Animator>();
-// if (animator)
-// {
-// animator.Play(GAStaticDefine.State_IdleHash);
-// animator.SetInteger(GAStaticDefine.Param_Action, GAStaticDefine.Act_Idle);
-// }
-// }
-// }
-
-// public void SitDown()
-// {
-// if (clothesModel != null)
-// {
-// var animator = clothesModel.GetComponent<Animator>();
-// if (animator)
-// {
-// animator.SetInteger(GAStaticDefine.Param_Action, GAStaticDefine.Act_Dazuo);
-// }
-// }
-
-// if (weaponModel != null)
-// {
-// GameObject prefab = InstanceResourcesLoader.LoadModelRes(weaponId, false);
-// if (prefab)
-// {
-// GameObjectPoolManager.Instance.ReleaseGameObject(prefab, weaponModel);
-// }
-// weaponModel = null;
-// }
-
-// if (job == 2)
-// {
-// if (secondaryModel)
-// {
-// secondaryModel.SetActive(false);
-// }
-// }
-// }
-
-// private void PutOnClothes(int _job, int clothesResId)
-// {
-// var config = JobSetupConfig.Get(_job);
-// if (clothesId == clothesResId)
-// {
-// return;
-// }
-
-// if (clothesId != 0)
-// {
-// UnloadClothes();
-// }
-
-// var _prefab = InstanceResourcesLoader.LoadModelRes(clothesResId, true);
-// if (!_prefab)
-// {
-// clothesResId = config.BaseEquip[0];
-// }
-
-// LoadClothes(clothesResId);
-// clothesId = clothesResId;
-
-// if (clothesModel)
-// {
-// if (weaponModel)
-// {
-// var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.WeaponBindBoneName);
-// weaponModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
-// }
-
-// if (wingsModel)
-// {
-// var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.WingBindBoneName);
-// wingsModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
-// }
-
-// if (secondaryModel)
-// {
-// var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[job - 1]);
-// wingsModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
-// }
-// }
-// }
-
-// private void LoadClothes(int resID)
-// {
-// var prefab = InstanceResourcesLoader.LoadModelRes(resID, true);
-// if (prefab)
-// {
-// var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// clothesModel = pool.Request();
-
-// LayerUtility.SetLayer(clothesModel, LayerUtility.Player, false);
-// var skinnedMeshRenderer = clothesModel.GetComponentInChildren<SkinnedMeshRenderer>(true);
-// LayerUtility.SetLayer(skinnedMeshRenderer.gameObject, LayerUtility.Player, false);
-// clothesModel.SetActive(true);
-// clothesModel.transform.SetParentEx(showPoint, Vector3.zero, Quaternion.identity, Vector3.one);
-// clothesAnimator = clothesModel.GetComponent<Animator>();
-
-// // 鍔ㄧ敾鐘舵�佹満淇敼
-// if (clothesAnimator)
-// {
-// cacheClothedAC = clothesAnimator.runtimeAnimatorController;
-// RuntimeAnimatorController _controller = AnimatorControllerLoader.Load(AnimatorControllerLoader.controllerUISuffix, resID);
-// clothesAnimator.runtimeAnimatorController = _controller;
-// clothesAnimator.enabled = true;
-// }
-// else
-// {
-// Debug.LogErrorFormat("瑙掕壊璧勬簮: {0} 娌℃湁鍔ㄧ敾鎺у埗鍣�", resID);
-// }
-// }
-// }
-
-// private void UnloadClothes()
-// {
-// if (clothesModel == null)
-// {
-// return;
-// }
-
-// var smRenderer = clothesModel.GetComponentInChildren<SkinnedMeshRenderer>();
-// if (smRenderer != null)
-// {
-// MaterialLoader.Release(smRenderer.material);
-// smRenderer.material = smRenderer.sharedMaterial = null;
-// smRenderer.materials = smRenderer.sharedMaterials = new Material[0];
-// }
-
-// var prefab = InstanceResourcesLoader.LoadModelRes(clothesId, true);
-// var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// pool.Release(clothesModel);
-// clothesModel = null;
-// if (clothesAnimator != null)
-// {
-// if (cacheClothedAC)
-// {
-// clothesAnimator.runtimeAnimatorController = cacheClothedAC;
-// cacheClothedAC = null;
-// }
-// clothesAnimator.enabled = false;
-// clothesAnimator = null;
-// }
-// }
-
-// private void PutOnWeapon(int _job, int resoureceId)
-// {
-// var config = JobSetupConfig.Get(_job);
-
-// var oldWeapon = weaponId;
-// if (oldWeapon == resoureceId)
-// {
-// return;
-// }
-
-// GameObject prefab = null;
-// GameObjectPoolManager.GameObjectPool pool = null;
-
-// if (oldWeapon != 0)
-// {
-// prefab = InstanceResourcesLoader.LoadModelRes(oldWeapon);
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// pool.Release(weaponModel);
-// weaponModel = null;
-// }
-
-// prefab = InstanceResourcesLoader.LoadModelRes(resoureceId);
-
-// if (!prefab)
-// {
-// resoureceId = config.BaseEquip[1];
-// prefab = InstanceResourcesLoader.LoadModelRes(resoureceId);
-// }
-
-// if (prefab)
-// {
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// weaponModel = pool.Request();
-
-// LayerUtility.SetLayer(weaponModel, LayerUtility.Player, false);
-// if (clothesModel)
-// {
-// var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.WeaponBindBoneName);
-// weaponModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
-// }
-
-// var _resConfig = ModelResConfig.Get(resoureceId);
-// ShowSecondaryEffect(weaponModel.transform, _resConfig.ResourcesName);
-// }
-
-// weaponId = resoureceId;
-// }
-
-// private void PutOnExtraSecondary(int job, int extraSecondaryId)
-// {
-// var oldSecondary = this.extraSecondaryId;
-// if (oldSecondary == extraSecondaryId)
-// {
-// return;
-// }
-
-// GameObject prefab = null;
-// GameObjectPoolManager.GameObjectPool pool = null;
-
-// if (oldSecondary != 0)
-// {
-// prefab = InstanceResourcesLoader.LoadModelRes(oldSecondary);
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// pool.Release(extraSecondaryModel);
-// extraSecondaryModel = null;
-// }
-
-// if (extraSecondaryId != 0)
-// {
-// prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
-// if (!prefab)
-// {
-// var config = JobSetupConfig.Get(job);
-// extraSecondaryId = config.BaseEquip[2];
-// prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
-// }
-
-// if (prefab)
-// {
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// extraSecondaryModel = pool.Request();
-
-// var parent = this.clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[this.job - 1]);
-// extraSecondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
-// }
-// }
-
-// this.extraSecondaryId = extraSecondaryId;
-// }
-
-// private void PutOnSecondary(int _job, int secondaryResId)
-// {
-// var oldSecondary = secondaryId;
-// if (oldSecondary == secondaryResId)
-// {
-// return;
-// }
-
-// GameObject prefab = null;
-// GameObjectPoolManager.GameObjectPool pool = null;
-
-// if (oldSecondary != 0)
-// {
-// prefab = InstanceResourcesLoader.LoadModelRes(oldSecondary);
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// pool.Release(secondaryModel);
-// secondaryModel = null;
-// }
-
-// if (secondaryResId != 0)
-// {
-// var _resConfig = ModelResConfig.Get(secondaryResId);
-// prefab = InstanceResourcesLoader.LoadModelRes(secondaryResId);
-// if (!prefab)
-// {
-// var config = JobSetupConfig.Get(_job);
-// secondaryResId = config.BaseEquip[2];
-// prefab = InstanceResourcesLoader.LoadModelRes(secondaryResId);
-// }
-
-// if (prefab)
-// {
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// secondaryModel = pool.Request();
-
-// var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[job - 1]);
-// secondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
-// }
-
-// ShowSecondaryEffect(secondaryModel.transform, _resConfig.ResourcesName);
-// }
-
-// secondaryId = secondaryResId;
-// }
-
-// private void PutOnWing(int resourceId)
-// {
-// var config = JobSetupConfig.Get(job);
-// var oldWings = wingsId;
-// if (resourceId == oldWings)
-// {
-// return;
-// }
-
-// GameObject prefab = null;
-// GameObjectPoolManager.GameObjectPool pool = null;
-
-// if (oldWings != 0)
-// {
-// prefab = InstanceResourcesLoader.LoadModelRes(oldWings);
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// pool.Release(wingsModel);
-// wingsModel = null;
-// }
-
-// if (resourceId != 0)
-// {
-// prefab = InstanceResourcesLoader.LoadModelRes(resourceId);
-
-// if (!prefab)
-// {
-// resourceId = config.BaseEquip[3];
-// prefab = InstanceResourcesLoader.LoadModelRes(resourceId);
-// }
-
-// if (prefab)
-// {
-// pool = GameObjectPoolManager.Instance.RequestPool(prefab);
-// wingsModel = pool.Request();
-
-// wingsModel.layer = LayerUtility.Player;
-// SkinnedMeshRenderer _renderer = wingsModel.GetComponentInChildren<SkinnedMeshRenderer>();
-// if (_renderer)
-// {
-// _renderer.gameObject.layer = LayerUtility.Player;
-// }
-
-// var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.WingBindBoneName);
-// var modelResConfig = ModelResConfig.Get(resourceId);
-// wingsModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, modelResConfig.UIScale);
-
-// wingsAnimator = wingsModel.GetComponent<Animator>();
-// if (wingsAnimator == null)
-// {
-// Debug.LogErrorFormat("缈呰唨璧勬簮{0}娌℃湁鍔ㄧ敾鎺у埗鍣�", resourceId);
-// }
-// wingsAnimator.enabled = true;
-// wingsAnimator.Play("UI_Idle", 0);
-// }
-// }
-
-// wingsId = resourceId;
-// }
-
-// private void LoadClothesEffect()
-// {
-// SwitchMaterial(isSuit);
-// HideSuitEffect();
-// if (isSuit)
-// {
-// var _modelResConfig = ModelResConfig.Get(clothesId);
-// if (_modelResConfig != null)
-// {
-// var _boneList = ModelResConfig.GetBoneList(_modelResConfig.ResourcesName);
-// var _effectList = ModelResConfig.GetEffectList(_modelResConfig.ResourcesName);
-// if (_boneList != null)
-// {
-// Transform _node = null;
-// SFXController _sfx = null;
-// for (int i = 0; i < _boneList.Count; ++i)
-// {
-// _node = clothesModel.transform.GetChildTransformDeeply(_boneList[i]);
-// if (_node)
-// {
-// _sfx = SFXPlayUtility.Instance.PlayEffectAsync(_effectList[i], _node);
-// if (_sfx)
-// {
-// m_SuitEffectList.Add(_sfx);
-// }
-// }
-// }
-// }
-// }
-// }
-// }
-
-// private List<SFXController> m_SuitEffectList = new List<SFXController>();
-// private List<SFXController> m_WeaponEffectList = new List<SFXController>();
-// private List<SFXController> m_SecondaryEffectList = new List<SFXController>();
-
-// private void ShowWeaponEffect(Transform parent, string modelName)
-// {
-// HideWeaponEffect();
-
-// var _boneList = ModelResConfig.GetBoneList(modelName);
-// var _effectlist = ModelResConfig.GetEffectList(modelName);
-
-// if (_boneList != null && _effectlist != null)
-// {
-// for (int i = 0; i < _boneList.Count; ++i)
-// {
-// if (_boneList[i].Equals("null"))
-// {
-// var _ctrl = SFXPlayUtility.Instance.PlayBattleEffect(_effectlist[i], parent);
-// m_WeaponEffectList.Add(_ctrl);
-// }
-// else
-// {
-
-// var _ctrl = SFXPlayUtility.Instance.PlayBattleEffect(_effectlist[i], parent.GetChildTransformDeeply(_boneList[i]));
-// m_WeaponEffectList.Add(_ctrl);
-// }
-// }
-// }
-// }
-
-// private void ShowSecondaryEffect(Transform parent, string modelName)
-// {
-// HideWeaponEffect();
-
-// var _boneList = ModelResConfig.GetBoneList(modelName);
-// var _effectlist = ModelResConfig.GetEffectList(modelName);
-
-// if (_boneList != null && _effectlist != null)
-// {
-// for (int i = 0; i < _boneList.Count; ++i)
-// {
-// if (_boneList[i].Equals("null"))
-// {
-// var _ctrl = SFXPlayUtility.Instance.PlayBattleEffect(_effectlist[i], parent);
-// m_SecondaryEffectList.Add(_ctrl);
-// }
-// else
-// {
-
-// var _ctrl = SFXPlayUtility.Instance.PlayBattleEffect(_effectlist[i], parent.GetChildTransformDeeply(_boneList[i]));
-// m_SecondaryEffectList.Add(_ctrl);
-// }
-// }
-// }
-// }
-
-// private void HideSecondaryEffect()
-// {
-// foreach (var _ctrl in m_SecondaryEffectList)
-// {
-// SFXPlayUtility.Instance.Release(_ctrl);
-// }
-// m_SecondaryEffectList.Clear();
-// }
-
-// private void HideWeaponEffect()
-// {
-// foreach (var _ctrl in m_WeaponEffectList)
-// {
-// SFXPlayUtility.Instance.Release(_ctrl);
-// }
-// m_WeaponEffectList.Clear();
-// }
-
-// private void HideSuitEffect()
-// {
-// foreach (var _ctrl in m_SuitEffectList)
-// {
-// SFXPlayUtility.Instance.Release(_ctrl);
-// }
-// m_SuitEffectList.Clear();
-// }
-
-// void ShowBodyEffect(UI3DPlayerExhibitionData data)
-// {
-// ShowReikiRootEffect(data.equipLevel, data.reikiRootEffectId);
-// int effectID = 0;
-// ModelCenter.Instance.GetModel<EquipModel>().equipAddEffect.TryGetValue(data.titleID, out effectID);
-// ShowTitleBodyEffect(effectID, data.scale > 0 ? data.scale*0.5f : 0.5f);
-// }
-
-// private void ShowReikiRootEffect(int equipLevel,int id)
-// {
-// //鏀规垚寮哄寲澶у笀鐗规晥 id涓哄己鍖栧ぇ甯堢瓑绾�
-// HideReikiRootEffect();
-// var config = ItemPlusMasterConfig.TryGetMasterInfo(equipLevel, id);
-// if (id != 0 && config != null && clothesModel)
-// {
-// if (reikiRootShowPoint == null && showPoint.parent != null)
-// {
-// reikiRootShowPoint = new GameObject("ReikiRootShowPoint");
-// reikiRootShowPoint.transform.SetParentEx(showPoint.parent, showPoint.localPosition, showPoint.rotation, showPoint.localScale);
-// }
-// reikiRootEffect = SFXPlayUtility.Instance.Play(config.effect, reikiRootShowPoint == null ? showPoint : reikiRootShowPoint.transform);
-// if (reikiRootEffect != null)
-// {
-// var scale = config.uiScale/100f;
-// var offsetY = config.offsetY/100f;
-// reikiRootEffect.transform.localScale = Vector3.one * scale * 0.6f;
-// reikiRootEffect.transform.localPosition = reikiRootEffect.transform.localPosition.SetY(offsetY);
-// }
-// }
-// }
-
-// private void HideReikiRootEffect()
-// {
-// if (reikiRootEffect != null)
-// {
-// reikiRootEffect.transform.localPosition = Vector3.zero;
-// reikiRootEffect.transform.localScale = Vector3.zero;
-// SFXPlayUtility.Instance.Release(reikiRootEffect);
-// reikiRootEffect = null;
-// }
-// }
-
-
-// public void HideTitleRootEffect()
-// {
-// if (titleRootEffect != null)
-// {
-// titleRootEffect.transform.localPosition = Vector3.zero;
-// titleRootEffect.transform.localScale = Vector3.zero;
-// SFXPlayUtility.Instance.Release(titleRootEffect);
-// titleRootEffect = null;
-// }
-// }
-
-
-// //灞曠ず绉板彿鐨勫叏韬壒鏁�
-// public void ShowTitleBodyEffect(int effectID, float scale = 1)
-// {
-// HideTitleRootEffect();
-// if (effectID == 0) return;
-// if (clothesModel)
-// {
-// if (reikiRootShowPoint == null && showPoint.parent != null)
-// {
-// reikiRootShowPoint = new GameObject("ReikiRootShowPoint");
-// reikiRootShowPoint.transform.SetParentEx(showPoint.parent, showPoint.localPosition, showPoint.rotation, showPoint.localScale);
-// }
-// titleRootEffect = SFXPlayUtility.Instance.Play(effectID, reikiRootShowPoint == null ? showPoint : reikiRootShowPoint.transform);
-// if (titleRootEffect != null)
-// {
-// titleRootEffect.duration = 0;
-// titleRootEffect.transform.localScale = Vector3.one * scale;
-// titleRootEffect.transform.localRotation = Quaternion.Euler(0, 40, 0);//鍚庣画浼樺寲浼犲弬
-// }
-// }
-// }
-
-// public void SwitchMaterial(bool isSuit)
-// {
-// if (clothesModel == null)
-// {
-// return;
-// }
-
-// var smRenderer = clothesModel.GetComponentInChildren<SkinnedMeshRenderer>();
-// if (smRenderer == null)
-// {
-// return;
-// }
-
-// MaterialLoader.Release(smRenderer.material);
-
-// var newMat = MaterialLoader.LoadClothesMaterial(this.clothesId, true, isSuit);
-// if (newMat != null)
-// {
-// smRenderer.material = newMat;
-// }
-// }
-
-// }
-
-// }
-
-
-
diff --git a/Main/Component/UI/Common/UI3DShowHero.cs.meta b/Main/Component/UI/Common/UI3DShowHero.cs.meta
deleted file mode 100644
index 4e4ee4b..0000000
--- a/Main/Component/UI/Common/UI3DShowHero.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 92189ab278e134645bc0a3682f03ad3c
-timeCreated: 1506068242
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Main/ResModule/AnimatorControllerLoader.cs b/Main/ResModule/AnimatorControllerLoader.cs
deleted file mode 100644
index 51f9a40..0000000
--- a/Main/ResModule/AnimatorControllerLoader.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-锘縰sing UnityEngine;
-
-
-#if UNITY_EDITOR
-using UnityEditor;
-#endif
-
-
-public class AnimatorControllerLoader
-{
- public static readonly string controllerSuffix = "AnimatorController_";
- public static readonly string controllerUISuffix = "AnimatorController_UI_";
- public static readonly string controllerShowSuffix = "AnimatorController_Show_";
- public static readonly string controllerRealmSuffix = "AnimatorController_Realm_";
-
- public static AnimationClip LoadAnimationClip(string name, string clipName)
- {
-
- AnimationClip _animationClip = null;
- if (AssetSource.mobFromEditor)
- {
-#if UNITY_EDITOR
- string _resourcesPath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
- "gmodels/",
- name,
- "/AnimationClips/",
- clipName,
- ".anim");
-
- _animationClip = AssetDatabase.LoadAssetAtPath<AnimationClip>(_resourcesPath);
-
-#endif
- }
- else
- {
- string _bundleName = StringUtility.Contact(ResourcesPath.MOB_FOLDER_NAME,
- ResourcesPath.MOB_SUFFIX,
- name);
-
- string _assetName = clipName;
- AssetInfo _assetInfo = new AssetInfo(_bundleName, _assetName);
-
- _animationClip = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as AnimationClip;
- }
-
- if (_animationClip == null)
- {
- Debug.LogErrorFormat("LoadAnimationClip.Load() => 鍔犺浇涓嶅埌璧勬簮: {0} => {1}.", name, clipName);
- }
-
- return _animationClip;
- }
-
- public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Fight()
- {
- return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
- GeneralDefine.ModeDefaultConfig[1][1].Replace("Prefab_Race_", ""));
- }
-
- public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Func()
- {
- return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
- GeneralDefine.ModeDefaultConfig[0][1].Replace("Prefab_Race_", ""));
- }
-
- public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Horse()
- {
- return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
- GeneralDefine.ModeDefaultConfig[3][1].Replace("Prefab_Horse_", ""));
- }
-
- public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Pet()
- {
- return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
- GeneralDefine.ModeDefaultConfig[2][1].Replace("Prefab_Race_", ""));
- }
-
- // public static RuntimeAnimatorController Load(string suffix, int id)
- // {
- // ModelResConfig _modelRes = ModelResConfig.Get(id);
- // string _name = _modelRes.ResourcesName;
- // if (_name.IndexOf('/') != -1)
- // {
- // _name = _name.Substring(0, _modelRes.ResourcesName.IndexOf('/'));
- // }
-
- // return LoadMobController(suffix, _name);
- // }
-
- public static RuntimeAnimatorController LoadMobController(string suffix, string _name)
- {
- RuntimeAnimatorController _controller = null;
- if (AssetSource.mobFromEditor)
- {
-#if UNITY_EDITOR
- string _resourcesPath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
- "gmodels/",
- _name,
- "/",
- suffix,
- _name,
- ".controller");
- _controller = AssetDatabase.LoadAssetAtPath<RuntimeAnimatorController>(_resourcesPath);
-
-#endif
- }
- else
- {
- string _bundleName = StringUtility.Contact(ResourcesPath.MOB_FOLDER_NAME,
- ResourcesPath.MOB_SUFFIX,
- _name.ToLower());
-
- string _assetName = StringUtility.Contact(suffix, _name);
- AssetInfo _assetInfo = new AssetInfo(_bundleName, _assetName);
-
- _controller = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as RuntimeAnimatorController;
- }
-
- if (_controller == null)
- {
- Debug.LogErrorFormat("AnimatorControllerLoader.Load() => 鍔犺浇涓嶅埌璧勬簮: {0}.", _name);
- }
-
- return _controller;
- }
-}
diff --git a/Main/ResModule/AnimatorControllerLoader.cs.meta b/Main/ResModule/AnimatorControllerLoader.cs.meta
deleted file mode 100644
index 9d0c5ba..0000000
--- a/Main/ResModule/AnimatorControllerLoader.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: ca5529344511289448b11828ad5068ab
-timeCreated: 1504086729
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Main/ResModule/AudioLoader.cs b/Main/ResModule/AudioLoader.cs
index f250808..027eb64 100644
--- a/Main/ResModule/AudioLoader.cs
+++ b/Main/ResModule/AudioLoader.cs
@@ -8,52 +8,12 @@
public static AudioClip LoadAudio(string _folderName, string _clipName)
{
- AudioClip audioClip = null;
- if (AssetSource.audioFromEditor)
- {
-#if UNITY_EDITOR
- var fileName = StringUtility.Contact("/", _clipName, AUDIO_EXTERSION);
- var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, ResourcesPath.AUDIO_SUFFIX, _folderName, fileName);
-
- audioClip = UnityEditor.AssetDatabase.LoadAssetAtPath<AudioClip>(path);
-#endif
- }
- else
- {
- var assetInfo = new AssetInfo(StringUtility.Contact("audio/", _folderName), _clipName);
- audioClip = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as AudioClip;
- }
-
- if (audioClip == null)
- {
- Debug.LogErrorFormat("AudioLoader.LoadSkillAudio() => 鍔犺浇涓嶅埌璧勬簮: {0}.", _clipName);
- }
-
- return audioClip;
+ return ResManager.Instance.LoadAsset<AudioClip>("Audio/" + _folderName, _clipName);
}
public static void LoadAudioAsync(string _folderName, string _clipName, Action<bool, UnityEngine.Object> _callBack)
{
- AudioClip audioClip = null;
- if (AssetSource.audioFromEditor)
- {
-#if UNITY_EDITOR
- var fileName = StringUtility.Contact("/", _clipName, AUDIO_EXTERSION);
- var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, ResourcesPath.AUDIO_SUFFIX, _folderName, fileName);
- audioClip = UnityEditor.AssetDatabase.LoadAssetAtPath<AudioClip>(path);
-
- if (_callBack != null)
- {
- _callBack(true, audioClip);
- }
-#endif
- }
- else
- {
- var assetInfo = new AssetInfo(StringUtility.Contact("audio/", _folderName).ToLower(), _clipName);
- AssetBundleUtility.Instance.Co_LoadAsset(assetInfo, _callBack);
- }
-
+ ResManager.Instance.LoadAssetAsync<AudioClip>("Audio/" + _folderName, _clipName, _callBack);
}
}
diff --git a/Main/ResModule/InstanceResourcesLoader.cs b/Main/ResModule/InstanceResourcesLoader.cs
deleted file mode 100644
index 180f3c3..0000000
--- a/Main/ResModule/InstanceResourcesLoader.cs
+++ /dev/null
@@ -1,547 +0,0 @@
-锘�// using UnityEngine;
-
-// using System;
-// #if UNITY_EDITOR
-// using UnityEditor;
-// #endif
-
-
-// public class InstanceResourcesLoader
-// {
-// public static readonly string raceSuffix = "Prefab_Race_";
-// public static readonly string horseSuffix = "Prefab_Horse_";
-// public static readonly string weaponSuffix = "Prefab_Weapon_";
-// 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,
-// "Gmodels/",
-// emptyJyName,
-// ".prefab");
-
-// _prefab = AssetDatabase.LoadAssetAtPath<GameObject>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// _prefab = AssetBundleUtility.Instance.Sync_LoadAsset("gmodels/prefab_race_jy", emptyJyName) as GameObject;
-// }
-
-// if (_prefab == null)
-// {
-// Debug.LogErrorFormat("InstanceResourcesLoader.LoadModel() => 鍔犺浇涓嶅埌璧勬簮: {0}/{1} ", "gmodels/prefab_race_jy", emptyJyName);
-// }
-
-// return _prefab;
-// }
-
-// // public static GameObject LoadNpc(int id)
-// // {
-// // NPCConfig _m = NPCConfig.Get(id);
-
-// // if (_m == null || string.IsNullOrEmpty(_m.MODE) || _m.MODE.Equals("0"))
-// // {
-// // return null;
-// // }
-
-// // return LoadModelPrefab(raceSuffix, _m.MODE);
-// // }
-
-// public static GameObject LoadDefaultFightNPC()
-// {
-// return LoadMob(GeneralDefine.ModeDefaultConfig[1][0],
-// GeneralDefine.ModeDefaultConfig[1][1]);
-// }
-
-// public static GameObject LoadDefaultFuncNPC()
-// {
-// return LoadMob(GeneralDefine.ModeDefaultConfig[0][0],
-// GeneralDefine.ModeDefaultConfig[0][1]);
-// }
-
-// public static void AsyncLoadDefaultFuncNpc(Action<bool, UnityEngine.Object> callBack)
-// {
-// AsyncLoadNpc(GeneralDefine.ModeDefaultConfig[0][0],
-// GeneralDefine.ModeDefaultConfig[0][1],
-// callBack);
-// }
-// public static void AsyncLoadDefaultFightNpc(Action<bool, UnityEngine.Object> callBack)
-// {
-// AsyncLoadNpc(GeneralDefine.ModeDefaultConfig[1][0],
-// GeneralDefine.ModeDefaultConfig[1][1],
-// callBack);
-// }
-// public static void AsyncLoadDefaultPet(Action<bool, UnityEngine.Object> callBack)
-// {
-// AsyncLoadNpc(GeneralDefine.ModeDefaultConfig[2][0],
-// GeneralDefine.ModeDefaultConfig[2][1],
-// callBack);
-// }
-
-// public static GameObject LoadDefaultHorse()
-// {
-// return LoadMob(GeneralDefine.ModeDefaultConfig[3][0],
-// GeneralDefine.ModeDefaultConfig[3][1]);
-// }
-
-// public static GameObject LoadDefaultPet()
-// {
-// return LoadMob(GeneralDefine.ModeDefaultConfig[2][0],
-// GeneralDefine.ModeDefaultConfig[2][1]);
-// }
-
-// // public static GameObject LoadNpcPrefab(int npcID)
-// // {
-// // NPCConfig _m = NPCConfig.Get(npcID);
-
-// // if (_m == null || _m.MODE.Equals("0"))
-// // {
-// // return null;
-// // }
-
-// // string _assetName;
-// // string _assetBundleName;
-
-// // if (GAMgr.Instance.s_NpcID2Assetname.TryGetValue(npcID, out _assetName))
-// // {
-// // _assetBundleName = GAMgr.Instance.s_NpcID2BundleName[npcID];
-// // }
-// // else
-// // {
-// // _assetName = StringUtility.Contact(raceSuffix, _m.MODE);
-// // _assetBundleName = StringUtility.Contact(ResourcesPath.MOB_FOLDER_NAME, _assetName);
-// // GAMgr.Instance.s_NpcID2Assetname[npcID] = _assetName;
-// // GAMgr.Instance.s_NpcID2BundleName[npcID] = _assetBundleName;
-// // }
-
-// // return LoadMob(_assetBundleName, _assetName);
-// // }
-
-// public static GameObject LoadModelRes(int id, bool _ui = false)
-// {
-
-// ModelResConfig _m = ModelResConfig.Get(id);
-
-// if (_m == null)
-// {
-// return null;
-// }
-
-// string _name = _m.ResourcesName;
-// int _index = _name.IndexOf('/');
-// if (_index != -1)
-// {
-// _name = _name.Substring(_index + 1);
-// }
-
-// if (_m.Type == (int)E_ModelResType.Suit)
-// {
-// return LoadModelPrefab(raceSuffix, _name, _ui);
-// }
-// else if (_m.Type == (int)E_ModelResType.Horse)
-// {
-// return LoadModelPrefab(horseSuffix, _name, _ui);
-// }
-// else if (_m.Type == (int)E_ModelResType.Wing)
-// {
-// return LoadModelPrefab(wingSuffix, _name, _ui);
-// }
-// else if (_m.Type == (int)E_ModelResType.Weapon)
-// {
-// return LoadModelPrefab(weaponSuffix, _name, _ui);
-// }
-// else if (_m.Type == (int)E_ModelResType.Secondary)
-// {
-// return LoadModelPrefab(secondarySuffix, _name, _ui);
-// }
-// else if (_m.Type == (int)E_ModelResType.Hand)
-// {
-// return LoadModelPrefab(handSuffix, _name, _ui);
-// }
-// return null;
-// }
-
-// public static void LoadCreateRole(int job, Action<bool, UnityEngine.Object> _callBack)
-// {
-// string _name = "Zs";
-// switch (job)
-// {
-// case 1:
-// _name = "Zs";
-// break;
-// case 2:
-// _name = "Fs";
-// break;
-// case 3:
-// _name = "Zs";
-// break;
-// case 4:
-// _name = "Zs";
-// break;
-// }
-
-// if (AssetSource.mobFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Gmodels/CreateRole/",
-// _name,
-// ".prefab");
-
-// var gameObject = AssetDatabase.LoadAssetAtPath<GameObject>(_resourcePath);
-
-// if (_callBack != null)
-// {
-// _callBack(true, gameObject);
-// }
-// #endif
-// }
-// else
-// {
-// var assetInfo = new AssetInfo("gmodels/createrole", _name);
-// AssetBundleUtility.Instance.Co_LoadAsset(assetInfo, _callBack);
-// }
-// }
-
-// private static GameObject LoadModelPrefab(string _suffix, string name)
-// {
-// GameObject _gameObject = null;
-// if (AssetSource.mobFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Gmodels/",
-// _suffix + name,
-// ".prefab");
-
-// _gameObject = AssetDatabase.LoadAssetAtPath<GameObject>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// string _bundleName = StringUtility.Contact(ResourcesPath.MOB_FOLDER_NAME, "prefab_race_" + name.Replace("_UI", ""));
-// string _assetName = _suffix + name;
-// _gameObject = AssetBundleUtility.Instance.Sync_LoadAsset(_bundleName, _assetName) as GameObject;
-// }
-
-// if (_gameObject == null)
-// {
-// Debug.LogErrorFormat("InstanceResourcesLoader.LoadModel() => 鍔犺浇涓嶅埌璧勬簮: {0} ", name);
-// }
-
-// return _gameObject;
-// }
-
-// public static GameObject LoadModelPrefab(string _suffix, string name, bool _ui)
-// {
-// var prefab = LoadModelPrefab(_suffix, _ui ? name + "_UI" : name);
-// if (prefab == null)
-// {
-// prefab = LoadModelPrefab(_suffix, name);
-// }
-
-// return prefab;
-// }
-
-// public static void AsyncLoadModelRes(int id, Action<bool, UnityEngine.Object> callback = null)
-// {
-// ModelResConfig _m = ModelResConfig.Get(id);
-
-// if (_m == null)
-// {
-// return;
-// }
-
-// string _name = _m.ResourcesName;
-// int _index = _name.IndexOf('/');
-// if (_index != -1)
-// {
-// _name = _name.Substring(_index + 1);
-// }
-
-// string _suffix = string.Empty;
-
-// if (_m.Type == (int)E_ModelResType.Suit)
-// {
-// _suffix = raceSuffix;
-// }
-// else if (_m.Type == (int)E_ModelResType.Horse)
-// {
-// _suffix = horseSuffix;
-// }
-// else if (_m.Type == (int)E_ModelResType.Wing)
-// {
-// _suffix = wingSuffix;
-// }
-// else if (_m.Type == (int)E_ModelResType.Weapon)
-// {
-// _suffix = weaponSuffix;
-// }
-// else if (_m.Type == (int)E_ModelResType.Secondary)
-// {
-// _suffix = secondarySuffix;
-// }
-// else if (_m.Type == (int)E_ModelResType.Hand)
-// {
-// _suffix = handSuffix;
-// }
-
-// if (AssetSource.mobFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Gmodels/",
-// _suffix + _name,
-// ".prefab");
-
-// var _gameObject = AssetDatabase.LoadAssetAtPath<GameObject>(_resourcePath);
-
-// if (_gameObject)
-// {
-// if (callback != null)
-// {
-// callback(true, _gameObject);
-// }
-// }
-// else
-// {
-// if (callback != null)
-// {
-// callback(false, null);
-// }
-// }
-// #endif
-// }
-// else
-// {
-// string _bundleName = StringUtility.Contact(ResourcesPath.MOB_FOLDER_NAME, "prefab_race_" + _name.Replace("_UI", ""));
-// string _assetName = _suffix + _name;
-
-// AssetBundleUtility.Instance.Co_LoadAsset(_bundleName, _assetName, callback);
-// }
-// }
-
-// public static GameObject LoadMob(string assetBundleName, string assetName)
-// {
-// GameObject _gameObject = null;
-// if (AssetSource.mobFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Gmodels/",
-// assetName,
-// ".prefab");
-
-// _gameObject = AssetDatabase.LoadAssetAtPath<GameObject>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// _gameObject = AssetBundleUtility.Instance.Sync_LoadAsset(assetBundleName, assetName) as GameObject;
-// }
-
-// if (_gameObject == null)
-// {
-// Debug.LogErrorFormat("InstanceResourcesLoader.LoadModel() => 鍔犺浇涓嶅埌璧勬簮: {0}/{1} ", assetBundleName, assetName);
-// }
-
-// return _gameObject;
-// }
-
-// public static void UnloadAsset(string bundleName, string assetName)
-// {
-// if (!AssetSource.mobFromEditor)
-// {
-// AssetBundleUtility.Instance.UnloadAsset(bundleName, assetName);
-// AssetBundleUtility.Instance.UnloadAssetBundle(bundleName, true, false);
-// }
-// }
-
-// public static GameObject LoadEffect(int id)
-// {
-// GameObject _gameObject = null;
-
-// EffectConfig _effectModel = EffectConfig.Get(id);
-
-// if (_effectModel == null)
-// {
-// return null;
-// }
-
-// if (AssetSource.effectFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Effect/",
-// _effectModel.packageName,
-// "/",
-// _effectModel.fxName,
-// ".prefab");
-// _gameObject = AssetDatabase.LoadAssetAtPath<GameObject>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// string _bundleName = StringUtility.Contact(ResourcesPath.EFFECT_Folder_Name, _effectModel.packageName);
-// _gameObject = AssetBundleUtility.Instance.Sync_LoadAsset(_bundleName, _effectModel.fxName) as GameObject;
-// }
-
-// if (_gameObject == null)
-// {
-// Debug.LogErrorFormat("InstanceResourcesLoader.LoadSkillEffect() => 鍔犺浇涓嶅埌璧勬簮: {0}", _effectModel.fxName);
-// }
-
-// return _gameObject;
-// }
-
-// public static void LoadEffectAsync(int _id, Action<bool, UnityEngine.Object> _callBack = null)
-// {
-// GameObject gameObject = null;
-// var config = EffectConfig.Get(_id);
-// if (config == null)
-// {
-// return;
-// }
-
-// if (AssetSource.effectFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Effect/",
-// config.packageName,
-// "/",
-// config.fxName,
-// ".prefab");
-// gameObject = AssetDatabase.LoadAssetAtPath<GameObject>(_resourcePath);
-
-// if (_callBack != null)
-// {
-// _callBack(gameObject != null, gameObject);
-// }
-// #endif
-// }
-// else
-// {
-// var bundleName = StringUtility.Contact(ResourcesPath.EFFECT_Folder_Name, config.packageName);
-// AssetBundleUtility.Instance.Co_LoadAsset(bundleName, config.fxName, _callBack);
-// }
-// }
-
-// public static void AsyncLoadNpc(int npcID, Action<bool, UnityEngine.Object> callBack = null)
-// {
-// NPCConfig _m = NPCConfig.Get(npcID);
-
-// if (_m == null || _m.MODE.Equals("0"))
-// {
-// if (callBack != null)
-// {
-// callBack(false, null);
-// }
-// }
-
-// string _assetName;
-// string _assetBundleName;
-
-// if (GAMgr.Instance.s_NpcID2Assetname.TryGetValue(npcID, out _assetName))
-// {
-// _assetBundleName = GAMgr.Instance.s_NpcID2BundleName[npcID];
-// }
-// else
-// {
-// _assetName = StringUtility.Contact(raceSuffix, _m.MODE);
-// _assetBundleName = StringUtility.Contact(ResourcesPath.MOB_FOLDER_NAME, _assetName);
-// GAMgr.Instance.s_NpcID2Assetname[npcID] = _assetName;
-// GAMgr.Instance.s_NpcID2BundleName[npcID] = _assetBundleName;
-// }
-
-// AsyncLoadNpc(_assetBundleName, _assetName, callBack);
-// }
-
-// public static void AsyncLoadNpc(string assetBundleName, string assetName, Action<bool, UnityEngine.Object> callBack = null)
-// {
-// if (AssetSource.mobFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Gmodels/",
-// assetName,
-// ".prefab");
-
-// var _p = AssetDatabase.LoadAssetAtPath<GameObject>(_resourcePath);
-// if (callBack != null)
-// {
-// callBack(true, _p);
-// }
-// #endif
-// }
-// else
-// {
-// AssetBundleUtility.Instance.Co_LoadAsset(assetBundleName, assetName, callBack);
-// }
-// }
-
-// public static void PreloadSkillEffect(int id)
-// {
-// var _skillInfo = SkillHelper.Instance.Get(id);
-// // 鎶�鑳界壒鏁堥鍔犺浇
-// if (_skillInfo.config.EffectName > 0)
-// {
-// InstanceResourcesLoader.LoadEffectAsync(_skillInfo.config.EffectName);
-// }
-// if (_skillInfo.config.BuffEffectID > 0)
-// {
-// InstanceResourcesLoader.LoadEffectAsync(_skillInfo.config.EffectName);
-// }
-
-// var _soSkill = _skillInfo.soFile;
-// if (_soSkill != null)
-// {
-// for (int i = 0; i < _soSkill.animationEventList.Count; ++i)
-// {
-// if (_soSkill.animationEventList[i].frameEventType == E_FrameEventType.OnPlayEffect)
-// {
-// if (_soSkill.animationEventList[i].intParam > 0)
-// {
-// InstanceResourcesLoader.LoadEffectAsync(_soSkill.animationEventList[i].intParam);
-// }
-// }
-// else if (_soSkill.animationEventList[i].frameEventType == E_FrameEventType.OnSkillEvent)
-// {
-// var _param = _soSkill.animationEventList[i].intParam;
-// var _type = SoSkill.GetAttactType(_param);
-// var _id = SoSkill.GetFrameEventId(_param);
-// if (_type == SoSkill.E_AttackType.Sweep)
-// {
-// var _config = ScriptableObjectLoader.LoadSoSweepHit(_id);
-// if (_config.hitEffectId > 0)
-// {
-// InstanceResourcesLoader.LoadEffectAsync(_config.hitEffectId);
-// }
-// }
-// else if (_type == SoSkill.E_AttackType.FlyObject)
-// {
-// var _config = ScriptableObjectLoader.LoadSoFlyObject(_id);
-// if (_config.hitEffectId > 0)
-// {
-// InstanceResourcesLoader.LoadEffectAsync(_config.hitEffectId);
-// }
-
-// if (_config.ammoEffectId > 0)
-// {
-// InstanceResourcesLoader.LoadEffectAsync(_config.hitEffectId);
-// }
-// }
-// }
-// }
-// }
-// }
-// }
diff --git a/Main/ResModule/InstanceResourcesLoader.cs.meta b/Main/ResModule/InstanceResourcesLoader.cs.meta
deleted file mode 100644
index 8cbff6a..0000000
--- a/Main/ResModule/InstanceResourcesLoader.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 69cc1ce5d10840542886d9f847f257ad
-timeCreated: 1504151459
-licenseType: Free
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Main/ResModule/MaterialLoader.cs b/Main/ResModule/MaterialLoader.cs
deleted file mode 100644
index 1597cdb..0000000
--- a/Main/ResModule/MaterialLoader.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-锘縰sing System.Collections.Generic;
-using UnityEngine;
-
-public class MaterialLoader
-{
- readonly static Dictionary<string, ObjectPool<Material>> s_MatDict = new Dictionary<string, ObjectPool<Material>>();
-
-// public static Material LoadClothesMaterial(int id, bool isUI, bool isSuit)
-// {
-// var _modelResConfig = ModelResConfig.Get(id);
-// if (_modelResConfig == null)
-// {
-// return null;
-
-// }
-
-// string _assetName = string.Empty;
-
-// if (isSuit)
-// {
-// if (isUI)
-// {
-// _assetName = _modelResConfig.Material_UI_Suit;
-// }
-// else
-// {
-// _assetName = _modelResConfig.Material_Fight_Suit;
-// }
-// }
-// else
-// {
-// if (isUI)
-// {
-// _assetName = _modelResConfig.Material_UI_Normal;
-// }
-// else
-// {
-// _assetName = _modelResConfig.Material_Fight_Normal;
-// }
-// }
-
-// if (string.IsNullOrEmpty(_assetName))
-// {
-// return null;
-// }
-
-// //Debug.LogFormat("鎯宠鍔犺浇鐨勬潗璐ㄧ殑鍚嶇О: {0}", _assetName);
-
-// ObjectPool<Material> _pool = null;
-
-// if (s_MatDict.TryGetValue(_assetName, out _pool))
-// {
-// if (_pool.inactivedCount > 0)
-// {
-// //Debug.Log(" |-- 姹犻噷鏈�, 浠庢睜閲屽彇");
-// return _pool.Get();
-// }
-// }
-
-// string _name = _modelResConfig.ResourcesName;
-// int _index = _name.IndexOf('/');
-// if (_index != -1)
-// {
-// _name = _name.Substring(_index + 1);
-// }
-
-// var _parentDirName = string.Empty;
-
-// if (_name.Contains("A_Zs"))
-// {
-// _parentDirName = "A_Zs";
-// }
-// else if (_name.Contains("A_Fs"))
-// {
-// _parentDirName = "A_Fs";
-// }
-
-// Material _mat = null;
-// if (AssetSource.mobFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Gmodels/",
-// _parentDirName,
-// "/Materials/",
-// _assetName,
-// ".mat");
-// _mat = UnityEditor.AssetDatabase.LoadAssetAtPath<Material>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// string _bundleName = StringUtility.Contact(ResourcesPath.MOB_FOLDER_NAME, InstanceResourcesLoader.raceSuffix, _name.ToLower());
-// AssetInfo _assetInfo = new AssetInfo(_bundleName, _assetName);
-// _mat = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as Material;
-// }
-
-// if (_mat == null)
-// {
-// Debug.LogErrorFormat("MaterialLoader.Load() => 鍔犺浇涓嶅埌璧勬簮: {0}", _assetName);
-// }
-
-// return _mat;
-// }
-
-// public static void Release(Material mat)
-// {
-// if (!mat)
-// {
-// return;
-// }
-
-// var _name = mat.name.Replace(" (Instance)", "");
-// //Debug.LogFormat("瑕侀噴鏀剧殑鏉愯川鐨勫悕绉�: {0}, 淇敼鍚庣殑鍚嶇О: {1}", mat.name, _name);
-
-// ObjectPool<Material> _pool = null;
-
-// if (!s_MatDict.TryGetValue(_name, out _pool))
-// {
-// _pool = new ObjectPool<Material>(null, null);
-// s_MatDict.Add(_name, _pool);
-// }
-
-// _pool.Add(mat);
-// }
-}
diff --git a/Main/ResModule/MaterialLoader.cs.meta b/Main/ResModule/MaterialLoader.cs.meta
deleted file mode 100644
index 1322a57..0000000
--- a/Main/ResModule/MaterialLoader.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 284a42a931dfa414c8ff5db85f34c88e
-timeCreated: 1504158381
-licenseType: Free
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Main/ResModule/ResManager.cs b/Main/ResModule/ResManager.cs
index d5f3d4d..0f40ef0 100644
--- a/Main/ResModule/ResManager.cs
+++ b/Main/ResModule/ResManager.cs
@@ -173,6 +173,55 @@
#endif
}
+ public void LoadAssetAsync<T>(string directory, string name, Action<bool, UnityEngine.Object> callBack) where T : UnityEngine.Object
+ {
+ // 鐗规畩澶勭悊 鍥犱负鏈変竴灞傚浘闆嗙殑鍏崇郴 directory瑕佷紶鍏ョ殑搴旇鏄痑tlas鐨勫悕瀛�
+ if (typeof(T) == typeof(Sprite))
+ {
+ LoadSpriteAsync<T>(directory, name, callBack);
+ return;
+ }
+
+ LoadAssetAsyncInternal<T>(directory, name, callBack);
+ }
+
+ private void LoadSpriteAsync<T>(string atlasName, string spriteName, Action<bool, UnityEngine.Object> callBack) where T : UnityEngine.Object
+ {
+#if !UNITY_EDITOR
+ LoadAssetAsync<SpriteAtlas>("Sprite", atlasName, (isLoaded, atlas) => {
+ if (isLoaded)
+ {
+ callBack?.Invoke(isLoaded, atlas.GetSprite(spriteName));
+ }
+ else
+ {
+ callBack?.Invoke(false, null);
+ }
+ });
+#else
+ // 缂栬緫鍣ㄤ笅鍙互鐩存帴鍔犺浇娌″暐闂
+ LoadAssetAsyncInternal<T>("Sprite/" + atlasName, spriteName, callBack);
+#endif
+ }
+
+ private void LoadAssetAsyncInternal<T>(string directory, string name, Action<bool, UnityEngine.Object> callBack) where T : UnityEngine.Object
+ {
+ var path = string.Concat($"Assets/ResourcesOut/{directory}/{name}", GetExtension(typeof(T))).Replace("//", "/");
+
+ if (AssetSource.uiFromEditor)
+ {
+#if UNITY_EDITOR
+ var asset = UnityEditor.AssetDatabase.LoadAssetAtPath<T>(path);
+ callBack?.Invoke(asset != null, asset);
+#endif
+ }
+ else
+ {
+ var assetInfo = new AssetInfo(directory.ToLower(), name.ToLower());
+ AssetBundleUtility.Instance.Co_LoadAsset(assetInfo, callBack);
+ }
+ }
+
public void UnloadAsset(string assetBundleName, string assetName)
{
if (AssetSource.uiFromEditor)
diff --git a/Main/ResModule/SceneLoader.cs b/Main/ResModule/SceneLoader.cs
deleted file mode 100644
index 042d780..0000000
--- a/Main/ResModule/SceneLoader.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-锘縰sing System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class SceneLoader
-{
-
- public static GameObject LoadCreateRole(string name)
- {
- GameObject prefab = null;
- if (AssetSource.sceneFromEditor)
- {
-#if UNITY_EDITOR
- var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, "Scene/CreateRole/", name, ".prefab");
- prefab = UnityEditor.AssetDatabase.LoadAssetAtPath<GameObject>(path);
-#endif
- }
- else
- {
- var assetInfo = new AssetInfo("maps/createrole", name);
- prefab = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as GameObject;
- }
-
- if (prefab == null)
- {
- Debug.LogErrorFormat("SceneLoader.LoadCreateRole() => 鍔犺浇涓嶅埌璧勬簮: {0}.", name);
- }
-
- return prefab;
- }
-
- public static Texture2D LoadTexture(string folder, string name)
- {
- Texture2D texture2D = null;
- if (AssetSource.sceneFromEditor)
- {
-#if UNITY_EDITOR
- var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, "Scene/", folder, "/", name, ".jpg");
- texture2D = UnityEditor.AssetDatabase.LoadAssetAtPath<Texture2D>(path);
-#endif
- }
- else
- {
- var assetInfo = new AssetInfo(StringUtility.Contact("maps/", folder).ToLower(), name);
- texture2D = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as Texture2D;
- }
-
- if (texture2D == null)
- {
- Debug.LogErrorFormat("SceneLoader.LoadTexture() => 鍔犺浇涓嶅埌璧勬簮: {0}.", name);
- }
-
- return texture2D;
- }
-
-
-}
diff --git a/Main/ResModule/SceneLoader.cs.meta b/Main/ResModule/SceneLoader.cs.meta
deleted file mode 100644
index 341c974..0000000
--- a/Main/ResModule/SceneLoader.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 9965235d149da744dbefdf8340b2b351
-timeCreated: 1547718608
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Main/ResModule/ScriptableObjectLoader.cs b/Main/ResModule/ScriptableObjectLoader.cs
deleted file mode 100644
index 6212c9c..0000000
--- a/Main/ResModule/ScriptableObjectLoader.cs
+++ /dev/null
@@ -1,490 +0,0 @@
-锘縰sing UnityEngine;
-using System;
-
-#if UNITY_EDITOR
-using UnityEditor;
-#endif
-
-public class ScriptableObjectLoader
-{
-
-// public const string bundleName = "config/scriptableobjects";
-// public const string SoActor_Suffix = "SoActor_";
-// public const string SoSkill_Suffix = "SoSkill_";
-// public const string SoFlyObject_Suffix = "SoFlyObject_";
-// public const string SoBodyControl_Suffix = "SoBodyControl_";
-// public const string SoSweepHit_Suffix = "SoSweepHit_";
-// public const string SoCameraSFX_Suffix = "SoCameraSFX_";
-// public const string SoDeadFly_Suffix = "SoDeadFly_";
-// public const string SoGhostShadow_Suffix = "SoGhostShadow_";
-// public const string SoNewBieGuide_Suffix = "NewBieGuideStep_";
-// public const string SoFunctionalGuide_Suffix = "FunctionalGuideStep_";
-// 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 const string SoHazyMapNpc_Suffix = "SoHazyMapNpc_";
-
-// public static SoMap LoadSoMapObjectGenerate(int mapID)
-// {
-// SoMap _config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoMapObjectGenerate/",
-// SoMapObjectGenerate_Suffix,
-// mapID,
-// ".asset");
-
-// _config = AssetDatabase.LoadAssetAtPath<SoMap>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// string _assetName = StringUtility.Contact(SoMapObjectGenerate_Suffix, mapID);
-// AssetInfo _assetInfo = new AssetInfo(bundleName, _assetName);
-// _config = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as SoMap;
-// }
-
-// if (_config == null)
-// {
-// Debug.LogErrorFormat("ScriptableObjectLoader.LoadSoActor() => 鍔犺浇涓嶅埌璧勬簮: {0}.", mapID);
-// }
-
-// return _config;
-
-// }
-
-// public static SoActor LoadSoActor(int raceId)
-// {
-// SoActor _config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoActor/",
-// SoActor_Suffix,
-// raceId,
-// ".asset");
-
-// _config = AssetDatabase.LoadAssetAtPath<SoActor>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// string _assetName = StringUtility.Contact(SoActor_Suffix, raceId);
-// AssetInfo _assetInfo = new AssetInfo(bundleName, _assetName);
-
-// _config = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as SoActor;
-// }
-
-// if (_config == null)
-// {
-// Debug.LogErrorFormat("ScriptableObjectLoader.LoadSoActor() => 鍔犺浇涓嶅埌璧勬簮: {0}.", raceId);
-// }
-
-// return _config;
-
-// }
-
-// public static SoSkill LoadSoSkill(int skillId)
-// {
-// SoSkill _config = null;
-
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoSkill/",
-// SoSkill_Suffix,
-// skillId,
-// ".asset");
-
-// _config = AssetDatabase.LoadAssetAtPath<SoSkill>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// string _assetName = StringUtility.Contact(SoSkill_Suffix, skillId);
-// AssetInfo _assetInfo = new AssetInfo(bundleName, _assetName);
-
-// _config = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as SoSkill;
-// }
-
-// if (_config == null)
-// {
-// //Debug.LogErrorFormat("ScriptableObjectLoader.LoadSoSkill() => 鍔犺浇涓嶅埌璧勬簮: {0}.", skillId);
-// }
-
-// return _config;
-
-// }
-
-// public static SoFlyObject LoadSoFlyObject(int id)
-// {
-// SoFlyObject _config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoFlyObject/",
-// SoFlyObject_Suffix,
-// id,
-// ".asset");
-
-// _config = AssetDatabase.LoadAssetAtPath<SoFlyObject>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// string _assetName = StringUtility.Contact(SoFlyObject_Suffix, id);
-// AssetInfo _assetInfo = new AssetInfo(bundleName, _assetName);
-
-// _config = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as SoFlyObject;
-// }
-
-// if (_config == null)
-// {
-// Debug.LogErrorFormat("ScriptableObjectLoader.LoadSoFlyObject() => 鍔犺浇涓嶅埌璧勬簮: {0}.", id);
-// }
-
-// return _config;
-
-// }
-
-// public static SoSweepHit LoadSoSweepHit(int id)
-// {
-// SoSweepHit _config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoSweepHit/",
-// SoSweepHit_Suffix,
-// id,
-// ".asset");
-
-// _config = AssetDatabase.LoadAssetAtPath<SoSweepHit>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// string _assetName = StringUtility.Contact(SoSweepHit_Suffix, id);
-// AssetInfo _assetInfo = new AssetInfo(bundleName, _assetName);
-
-// _config = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as SoSweepHit;
-// }
-
-// if (_config == null)
-// {
-// Debug.LogErrorFormat("ScriptableObjectLoader.LoadSoSweepHit() => 鍔犺浇涓嶅埌璧勬簮: {0}.", id);
-// }
-
-// return _config;
-
-// }
-
-// public static SoBodyControl LoadSoBodyControl(int id)
-// {
-// SoBodyControl _config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoBodyControl/",
-// SoBodyControl_Suffix,
-// id,
-// ".asset");
-
-// _config = AssetDatabase.LoadAssetAtPath<SoBodyControl>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// string _assetName = StringUtility.Contact(SoBodyControl_Suffix, id);
-// AssetInfo _assetInfo = new AssetInfo(bundleName, _assetName);
-// _config = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as SoBodyControl;
-// }
-
-// if (_config == null)
-// {
-// Debug.LogErrorFormat("ScriptableObjectLoader.LoadSoBodyControl() => 鍔犺浇涓嶅埌璧勬簮: {0}.", id);
-// }
-
-// return _config;
-// }
-
-// public static SoCameraSFX LoadSoCameraSFX(int id)
-// {
-// SoCameraSFX _config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoCameraSFX/",
-// SoCameraSFX_Suffix,
-// id,
-// ".asset");
-
-// _config = AssetDatabase.LoadAssetAtPath<SoCameraSFX>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// string _assetName = StringUtility.Contact(SoCameraSFX_Suffix, id);
-// AssetInfo _assetInfo = new AssetInfo(bundleName, _assetName);
-
-// _config = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as SoCameraSFX;
-// }
-
-// if (_config == null)
-// {
-// Debug.LogErrorFormat("ScriptableObjectLoader.LoadSoCameraSFX() => 鍔犺浇涓嶅埌璧勬簮: {0}.", id);
-// }
-
-// return _config;
-// }
-
-// public static SoDeadFly LoadSoDeadFly(int id)
-// {
-// SoDeadFly _config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoDeadFly/",
-// SoDeadFly_Suffix,
-// id,
-// ".asset");
-
-// _config = AssetDatabase.LoadAssetAtPath<SoDeadFly>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// string _assetName = StringUtility.Contact(SoDeadFly_Suffix, id);
-// AssetInfo _assetInfo = new AssetInfo(bundleName, _assetName);
-// _config = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as SoDeadFly;
-// }
-
-// if (_config == null)
-// {
-// Debug.LogErrorFormat("ScriptableObjectLoader.LoadSoCameraSFX() => 鍔犺浇涓嶅埌璧勬簮: {0}.", id);
-// }
-
-// return _config;
-
-// }
-
-// public static SoGhostShadow LoadSoGhostShadow(int id)
-// {
-// SoGhostShadow _config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-// string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoGhostShadow/",
-// SoGhostShadow_Suffix,
-// id,
-// ".asset");
-
-// _config = AssetDatabase.LoadAssetAtPath<SoGhostShadow>(_resourcePath);
-// #endif
-// }
-// else
-// {
-// string _assetName = StringUtility.Contact(SoGhostShadow_Suffix, id);
-// AssetInfo _assetInfo = new AssetInfo(bundleName, _assetName);
-// _config = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as SoGhostShadow;
-// }
-
-// if (_config == null)
-// {
-// Debug.LogErrorFormat("ScriptableObjectLoader.LoadSoGhostShadow() => 鍔犺浇涓嶅埌璧勬簮: {0}.", id);
-// }
-
-// return _config;
-// }
-
-// public static NewBieGuideScriptableObject LoadSoNewBieGuideStep(int _id)
-// {
-// NewBieGuideScriptableObject config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-// var resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoNewBieGuide/",
-// SoNewBieGuide_Suffix,
-// _id,
-// ".asset");
-
-// config = AssetDatabase.LoadAssetAtPath<NewBieGuideScriptableObject>(resourcePath);
-// #endif
-// }
-// else
-// {
-// var assetName = StringUtility.Contact(SoNewBieGuide_Suffix, _id);
-// var assetInfo = new AssetInfo(bundleName, assetName);
-// config = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as NewBieGuideScriptableObject;
-// }
-
-// if (config == null)
-// {
-// Debug.LogErrorFormat("ScriptableObjectLoader.LoadSoNewBieGuideStep() => 鍔犺浇涓嶅埌璧勬簮: {0}.", _id);
-// }
-
-// return config;
-// }
-
-// public static NewBieGuideScriptableObject LoadSoFunctionalGuideStep(int _id)
-// {
-// NewBieGuideScriptableObject config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-// var resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoNewBieGuide/",
-// SoFunctionalGuide_Suffix,
-// _id,
-// ".asset");
-
-// config = AssetDatabase.LoadAssetAtPath<NewBieGuideScriptableObject>(resourcePath);
-// #endif
-// }
-// else
-// {
-// var assetName = StringUtility.Contact(SoFunctionalGuide_Suffix, _id);
-// var assetInfo = new AssetInfo(bundleName, assetName);
-// config = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as NewBieGuideScriptableObject;
-// }
-
-// if (config == null)
-// {
-// Debug.LogErrorFormat("ScriptableObjectLoader.LoadSoFunctionalGuideStep() => 鍔犺浇涓嶅埌璧勬簮: {0}.", _id);
-// }
-
-// return config;
-// }
-
-// public static TreasureMeridianConfig LoadSoTreasureMeridian(int _id)
-// {
-// TreasureMeridianConfig config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-// var resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoTreasureMeridian/",
-// SoTreasureMeridian_Suffix,
-// _id,
-// ".asset");
-
-// config = AssetDatabase.LoadAssetAtPath<TreasureMeridianConfig>(resourcePath);
-// #endif
-// }
-// else
-// {
-// var assetName = StringUtility.Contact(SoTreasureMeridian_Suffix, _id);
-// var assetInfo = new AssetInfo(bundleName, assetName);
-// config = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as TreasureMeridianConfig;
-// }
-
-// if (config == null)
-// {
-// Debug.LogErrorFormat("ScriptableObjectLoader.TreasureMeridianConfig() => 鍔犺浇涓嶅埌璧勬簮: {0}.", _id);
-// }
-
-// return config;
-// }
-
-// public static Treasure3DConfig LoadSoTreasure3DConfig(int _id)
-// {
-// Treasure3DConfig config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-// var resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoTreasure3D/",
-// SoTreasure3D_Suffix,
-// _id,
-// ".asset");
-
-// config = AssetDatabase.LoadAssetAtPath<Treasure3DConfig>(resourcePath);
-// #endif
-// }
-// else
-// {
-// var assetName = StringUtility.Contact(SoTreasure3D_Suffix, _id);
-// var assetInfo = new AssetInfo(bundleName, assetName);
-// config = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as Treasure3DConfig;
-// }
-
-// if (config == null)
-// {
-// //Debug.LogErrorFormat("ScriptableObjectLoader.TreasureMeridianConfig() => 鍔犺浇涓嶅埌璧勬簮: {0}.", _id);
-// }
-
-// 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;
-// }
-
-// public static HazyMapNpcScriptableObject LoadSoHazyMapNpc(int _mapId)
-// {
-// HazyMapNpcScriptableObject config = null;
-// if (AssetSource.refdataFromEditor)
-// {
-// #if UNITY_EDITOR
-// var resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
-// "Refdata/ScriptableObject/SoHazyMapNpc/",
-// SoHazyMapNpc_Suffix,
-// _mapId,
-// ".asset");
-
-// config = AssetDatabase.LoadAssetAtPath<HazyMapNpcScriptableObject>(resourcePath);
-// #endif
-// }
-// else
-// {
-// var assetName = StringUtility.Contact(SoHazyMapNpc_Suffix, _mapId);
-// var assetInfo = new AssetInfo(bundleName, assetName);
-// config = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as HazyMapNpcScriptableObject;
-// }
-
-// if (config == null)
-// {
-// }
-
-// return config;
-// }
-}
\ No newline at end of file
diff --git a/Main/ResModule/ScriptableObjectLoader.cs.meta b/Main/ResModule/ScriptableObjectLoader.cs.meta
deleted file mode 100644
index 3ca2583..0000000
--- a/Main/ResModule/ScriptableObjectLoader.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: a931a089f7045294f91a15bc047d72e2
-timeCreated: 1504164167
-licenseType: Free
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Main/ResModule/VideoLoader.cs b/Main/ResModule/VideoLoader.cs
deleted file mode 100644
index 4afbcbf..0000000
--- a/Main/ResModule/VideoLoader.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-锘縰sing System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Video;
-
-public class VideoLoader
-{
-
- static string MP4_EXTERSION = ".mp4";
-
- public static VideoClip Load(string _clipName)
- {
- VideoClip videoClip = null;
- if (AssetSource.videoFromEditor)
- {
-#if UNITY_EDITOR
- var fileName = StringUtility.Contact("/", _clipName, MP4_EXTERSION);
- var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, ResourcesPath.VIDEO_SUFFIX, fileName);
- videoClip = UnityEditor.AssetDatabase.LoadAssetAtPath<VideoClip>(path);
-#endif
- }
- else
- {
- var assetInfo = new AssetInfo("video/" + _clipName, _clipName);
- videoClip = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as VideoClip;
- }
-
- if (videoClip == null)
- {
- Debug.LogErrorFormat("AudioLoader.LoadSkillAudio() => 鍔犺浇涓嶅埌璧勬簮: {0}.", _clipName);
- }
-
- return videoClip;
- }
-
- public static void LoadAsync(string _folderName, string _clipName, Action<bool, UnityEngine.Object> _callBack)
- {
- VideoClip videoClip = null;
- if (AssetSource.audioFromEditor)
- {
-#if UNITY_EDITOR
- var fileName = StringUtility.Contact("/", _clipName, MP4_EXTERSION);
- var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, ResourcesPath.VIDEO_SUFFIX, _folderName, fileName);
- videoClip = UnityEditor.AssetDatabase.LoadAssetAtPath<VideoClip>(path);
-
- if (_callBack != null)
- {
- _callBack(true, videoClip);
- }
-#endif
- }
- else
- {
- var assetInfo = new AssetInfo("video/mp4", _clipName);
- AssetBundleUtility.Instance.Co_LoadAsset(assetInfo, _callBack);
- }
-
- }
-
-}
diff --git a/Main/ResModule/VideoLoader.cs.meta b/Main/ResModule/VideoLoader.cs.meta
deleted file mode 100644
index d95b9e4..0000000
--- a/Main/ResModule/VideoLoader.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 288ed29d137c09c43959063f8d4e3dd2
-timeCreated: 1557279838
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
--
Gitblit v1.8.0