【资源路径】 移动 被保护目标 资源路径
parent
30606228a4
commit
4317bb17e0
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ea478dcf49cbf364ea5a9b42856336cb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -29,14 +29,6 @@ MonoBehaviour:
|
|||
AssetTags:
|
||||
ActiveRuleName: EnableGroup
|
||||
Collectors:
|
||||
- CollectPath: Assets/_Test/Prefab
|
||||
CollectorGUID: c9ef3e8404ba50a48b29e92ee09d5adc
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
PackRuleName: PackDirectory
|
||||
FilterRuleName: CollectPrefab
|
||||
AssetTags:
|
||||
UserData:
|
||||
- CollectPath: Assets/Art/Scene/TireMark
|
||||
CollectorGUID: 778348cc5a38284488657416460ee2ed
|
||||
CollectorType: 0
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ using Gameplay.Performance;
|
|||
using Gameplay.Skill;
|
||||
using Gameplay.Unit;
|
||||
using Gameplay.Unit.Data;
|
||||
using Gameplay.Utils;
|
||||
using LTGame;
|
||||
using PhxhSDK;
|
||||
using UnityEngine;
|
||||
|
|
@ -70,11 +71,12 @@ namespace Gameplay.Fight.Protect
|
|||
|
||||
public async UniTask CreateAsync()
|
||||
{
|
||||
GameUnitManager.instance.RecordLoadPath(configData.modelPath);
|
||||
var sampleObj = await AssetManager.Instance.LoadAssetAsync<GameObject>(configData.modelPath);
|
||||
var modelPath = PathEx.GetProtectUnitModelPath(configData.modelPath);
|
||||
GameUnitManager.instance.RecordLoadPath(modelPath);
|
||||
var sampleObj = await AssetManager.Instance.LoadAssetAsync<GameObject>(modelPath);
|
||||
if (sampleObj == null)
|
||||
{
|
||||
DebugUtil.LogError("加载BeProtectUnit失败: {0}", configData.modelPath);
|
||||
DebugUtil.LogError("加载BeProtectUnit失败: {0}", modelPath);
|
||||
return;
|
||||
}
|
||||
if (Node == null) return;
|
||||
|
|
|
|||
|
|
@ -92,6 +92,12 @@ namespace Gameplay.Utils
|
|||
return $"Assets/Art_Out/Manual/Battery/{batteryName}.prefab";
|
||||
}
|
||||
|
||||
public static string GetProtectUnitModelPath(string modelName)
|
||||
{
|
||||
// Assets/Art_Out/Manual/Protect/P_V_50001.prefab
|
||||
return $"Assets/Art_Out/Manual/Protect/{modelName}.prefab";
|
||||
}
|
||||
|
||||
public static string GetFightBuildingModelPath(uint uid)
|
||||
{
|
||||
var cfg = TableManager.Instance.Tables.BuildConfig.Get((int)uid);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"VehicleType": 1,
|
||||
"Name": "测试被保护目标",
|
||||
"NameLocal": "",
|
||||
"PrefabPath": "Assets/Art/Character/Prefabs/Protect/P_V_50001.prefab",
|
||||
"PrefabPath": "P_V_50001",
|
||||
"StandCrossLevel": 999,
|
||||
"MoveCrossLevel": 1,
|
||||
"Defense": 200,
|
||||
|
|
|
|||
Loading…
Reference in New Issue