| | |
| | |
|
| | | 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);
|
| | |
| | | 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";
|
| | |
|
| | |
| | | string _tempName = resName;
|
| | |
|
| | | if ((resName.StartsWith("A_Zs") || resName.StartsWith("A_Fs"))
|
| | | && suffix.Equals(InstanceResourcesLoader.raceSuffix) && !isHighMesh)
|
| | | && (suffix.Equals(InstanceResourcesLoader.raceSuffix)
|
| | | || suffix.Equals(InstanceResourcesLoader.handSuffix))
|
| | | && !isHighMesh)
|
| | | {
|
| | | _tempName += "_Dm";
|
| | | }
|
| | |
| | | Renderer _renderer = _rendererNode.GetComponent<Renderer>();
|
| | | if (_renderer)
|
| | | {
|
| | | OnSetupRenderer(path, resName, ref _renderer);
|
| | | OnSetupRenderer(path, _tempName, ref _renderer);
|
| | | }
|
| | |
|
| | | Animation _animation = _prefab.GetComponent<Animation>();
|
| | |
| | | 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);
|