| | |
| | | using UnityEngine; |
| | | using TableConfig; |
| | | |
| | | |
| | | #if UNITY_EDITOR |
| | | using UnityEditor; |
| | |
| | | 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) |
| | | { |
| | |
| | | |
| | | if (_animationClip == null) |
| | | { |
| | | DesignDebug.LogErrorFormat("LoadAnimationClip.Load() => 加载不到资源: {0} => {1}.", name, clipName); |
| | | DebugEx.LogErrorFormat("LoadAnimationClip.Load() => 加载不到资源: {0} => {1}.", name, clipName); |
| | | } |
| | | |
| | | return _animationClip; |
| | |
| | | public static RuntimeAnimatorController Load(string suffix, int id) |
| | | { |
| | | RuntimeAnimatorController _controller = null; |
| | | ModelResConfig _modelRes = ConfigManager.Instance.GetTemplate<ModelResConfig>(id); |
| | | ModelResConfig _modelRes = ModelResConfig.Get(id); |
| | | string _name = _modelRes.ResourcesName; |
| | | if (_name.IndexOf('/') != -1) |
| | | { |
| | |
| | | |
| | | if (_controller == null) |
| | | { |
| | | DesignDebug.LogErrorFormat("AnimatorControllerLoader.Load() => 加载不到资源: {0}_{1}.", suffix, _name); |
| | | DebugEx.LogErrorFormat("AnimatorControllerLoader.Load() => 加载不到资源: {0}_{1}.", suffix, _name); |
| | | } |
| | | |
| | | return _controller; |
| | |
| | | |
| | | if (_controller == null) |
| | | { |
| | | DesignDebug.LogErrorFormat("AnimatorControllerLoader.Load() => 加载不到资源: {0}.", _name); |
| | | DebugEx.LogErrorFormat("AnimatorControllerLoader.Load() => 加载不到资源: {0}.", _name); |
| | | } |
| | | |
| | | return _controller; |