模型预览功能

This commit is contained in:
2025-10-26 23:32:33 +08:00
parent 1c18e4a338
commit ce6cd8235f
370 changed files with 12735 additions and 10269 deletions

View File

@@ -17,6 +17,7 @@ namespace NBF
{
var itemConfig = ItemConfig.Get(itemInfo.ConfigId);
TextTitle.text = itemInfo.ConfigId.GetName();
TextContent.text = itemInfo.ConfigId.GetDesc();
TextTitle.SetQuality(itemInfo.Config.Quality);
}
}

View File

@@ -23,7 +23,7 @@ namespace NBF
[AutoFind(Name = "modelBack")]
public GImage modelBack;
[AutoFind(Name = "Model")]
public ModelTexture Model;
public ModelViewer Model;
[AutoFind(Name = "Content")]
public ItemDetailsContent Content;
[AutoFind(Name = "Quality")]

View File

@@ -21,14 +21,13 @@ namespace NBF
ItemInfo = GetData() as ItemInfo;
Quality.SetQuality(ItemInfo.Config.Quality);
Content.Basic.SetInfo(ItemInfo);
Content.Basic.SetInfo(ItemInfo);
var model = PrefabsHelper.CreatePrefab(ItemInfo.Config.Model);
Model.SetModel(model);
// LoadModel(ItemInfo.Config.Model);
// var model = PrefabsHelper.CreatePrefab(ItemInfo.Config.Model);
Model.SetData(ItemInfo.Config);
Game.Input.OnUICanceled += OnUICanceled;
}
@@ -50,7 +49,6 @@ namespace NBF
}
protected override void OnHide()
{
Game.Input.OnUICanceled -= OnUICanceled;