This commit is contained in:
2026-05-17 15:21:27 +08:00
parent 870477f864
commit 6a5d729568
4 changed files with 40 additions and 13 deletions

View File

@ -760,6 +760,10 @@ export class GameManager extends Monobehiver {
}): void {
this.updateDictionaries();
// 调试:打印所有材质名称
console.log('[applyMaterial] 查找材质:', options.target);
console.log('[applyMaterial] 当前所有材质:', this.materialDic.Values().map(m => m.name));
// 查找目标材质(支持精确匹配和前缀匹配)
const targetMaterials: PBRMaterial[] = [];
this.materialDic.Values().forEach(material => {
@ -773,6 +777,8 @@ export class GameManager extends Monobehiver {
return;
}
console.log('[applyMaterial] 找到材质:', targetMaterials.map(m => m.name));
// 应用材质属性到目标材质
targetMaterials.forEach(material => {
// 应用颜色