feat:角色展示增加显示装备配置项
This commit is contained in:
@@ -59,13 +59,13 @@ namespace CharacterPreview
|
||||
var canvasObj = GameObject.Find("Canvas");
|
||||
if (canvasObj == null)
|
||||
{
|
||||
Debug.Log("Canvas not found");
|
||||
Debug.LogWarning("Canvas not found");
|
||||
return;
|
||||
}
|
||||
var mainMenu=GameObjectUtils.FindObjectByPath(canvasObj, "MainMenuContainer");
|
||||
if (!mainMenu)
|
||||
{
|
||||
Debug.Log("MainMenuContainer not found");
|
||||
Debug.LogWarning("MainMenuContainer not found");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -101,11 +101,13 @@ namespace CharacterPreview
|
||||
return;
|
||||
}
|
||||
|
||||
Item item = await ItemSavesUtilities.LoadItem(characterItemSaveKey);
|
||||
Item? item = null;
|
||||
if (config.data.showEquipment)
|
||||
{
|
||||
item = await ItemSavesUtilities.LoadItem(characterItemSaveKey);
|
||||
}
|
||||
if (item == null)
|
||||
{
|
||||
Debug.Log($"[CreateCharacterModel] 未找到已保存的 {characterItemSaveKey},将使用默认角色模板创建新角色。");
|
||||
|
||||
var defaultTypeID = GameplayDataSettings.ItemAssets.DefaultCharacterItemTypeID;
|
||||
item = await ItemAssetsCollection.InstantiateAsync(defaultTypeID);
|
||||
if (item == null)
|
||||
@@ -281,7 +283,7 @@ namespace CharacterPreview
|
||||
}
|
||||
|
||||
public static CharacterMainControl CreateCharacter(
|
||||
Item itemInstance,
|
||||
Item? itemInstance,
|
||||
CharacterModel modelPrefab,
|
||||
Vector3 pos,
|
||||
Quaternion rotation)
|
||||
|
||||
Reference in New Issue
Block a user