feat:角色展示增加显示装备配置项

This commit is contained in:
m0_75251201
2025-11-18 19:12:34 +08:00
parent 6cb89ba439
commit bef0d43792
5 changed files with 11 additions and 8 deletions

View File

@@ -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)

View File

@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("CharacterPreview")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8fcbdc5649e0b93fd1b771001f53cdbb81da2c78")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6cb89ba4398ec37a8aa131d176c6f4b85ddbf3b0")]
[assembly: System.Reflection.AssemblyProductAttribute("CharacterPreview")]
[assembly: System.Reflection.AssemblyTitleAttribute("CharacterPreview")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
2dcee58ea3d10e33f69ccfa06e1fe3a4fe22d6ce0e9a2c07a40e5dff5a0c39dd
cbee91e822d9ef04e2d67aa8b9bb2a276fe0b999202eacd0c7845f2ebd98f435