少年修仙传客户端基础资源
client_Hale
2018-11-01 6b360664234cd2692b9aed93cf7b09b4a644de02
Assets/Editor/Actor/ResourcesBuilder.cs
@@ -140,7 +140,7 @@
        if ((resName.StartsWith("A_Zs") || resName.StartsWith("A_Fs"))
         && !isHighMesh
         && suffix.Equals(InstanceResourcesLoader.raceSuffix))
         && (suffix.Equals(InstanceResourcesLoader.raceSuffix) || suffix.Equals(InstanceResourcesLoader.handSuffix)))
        {
            _absOriginalePath = string.Format("{0}/ART/Role/{1}/{2}_Dm.FBX", Application.dataPath, path, resName);
            _originalAssetPath = string.Format("Assets/ART/Role/{0}/{1}_Dm.FBX", path, resName);
@@ -149,8 +149,8 @@
        string _tempPrefabName = outName;
        if (isHighMesh
        && ((!resName.StartsWith("A_Zs") && !resName.StartsWith("A_Fs"))
            || !suffix.Equals(InstanceResourcesLoader.raceSuffix)))
        && ((resName.StartsWith("A_Zs") || resName.StartsWith("A_Fs"))
        && (suffix.Equals(InstanceResourcesLoader.raceSuffix) || suffix.Equals(InstanceResourcesLoader.handSuffix))))
        {
            _tempPrefabName += "_UI";
@@ -340,18 +340,26 @@
            Object.DestroyImmediate(_animation);
        }
        Animator _animator = _prefab.GetComponent<Animator>();
        if (!_animator)
        if (suffix.Equals(InstanceResourcesLoader.raceSuffix)
         || suffix.Equals(InstanceResourcesLoader.horseSuffix)
         || suffix.Equals(InstanceResourcesLoader.wingSuffix))
        {
            _animator = _prefab.AddComponent<Animator>();
        }
            Animator _animator = _prefab.GetComponent<Animator>();
        // 绑定动画控制器
        RuntimeAnimatorController _runtimeAnimatorContorller = AssetDatabase.LoadAssetAtPath<RuntimeAnimatorController>(_acAssetPath);
        if (_runtimeAnimatorContorller)
        {
            _animator.runtimeAnimatorController = _runtimeAnimatorContorller;
            if (!_animator)
            {
                _animator = _prefab.AddComponent<Animator>();
            }
            if (suffix.Equals(InstanceResourcesLoader.wingSuffix))
            {
                // 绑定动画控制器
                RuntimeAnimatorController _runtimeAnimatorContorller = AssetDatabase.LoadAssetAtPath<RuntimeAnimatorController>(_acAssetPath);
                if (_runtimeAnimatorContorller)
                {
                    _animator.runtimeAnimatorController = _runtimeAnimatorContorller;
                }
            }
        }
        PrefabUtility.CreatePrefab(_assetPath, _prefab, ReplacePrefabOptions.Default);