1
This commit is contained in:
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user