1
This commit is contained in:
@ -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 => {
|
||||
// 应用颜色
|
||||
|
||||
Reference in New Issue
Block a user