This commit is contained in:
2026-05-18 12:13:34 +08:00
parent 8d784c2939
commit fdc031673f
12 changed files with 361672 additions and 297926 deletions

View File

@ -76,7 +76,7 @@ export class GameManager extends Monobehiver {
this.updateDictionaries();
this.cacheRollerDoorMeshes();
console.log('材质字典:', this.materialDic);
this.setRollerDoorScale("Box006.001", new Vector3(0.12, 0.02, 0.118));
this.setRollerDoorScale("Box005.001", new Vector3(0.13, 0.02, 0.12));
}
@ -760,9 +760,7 @@ 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[] = [];
@ -777,7 +775,7 @@ export class GameManager extends Monobehiver {
return;
}
console.log('[applyMaterial] 找到材质:', targetMaterials.map(m => m.name));
// 应用材质属性到目标材质
targetMaterials.forEach(material => {
@ -816,6 +814,6 @@ export class GameManager extends Monobehiver {
material.markDirty();
});
console.log(`Material applied to ${targetMaterials.length} material(s): ${options.target}`, options);
}
}