版本:3.6.0~3.7.1
材质getProperty
在没有调用setProperty
之前,无法获得shader的默认值,只会返回一个null。
示例代码:
this.material = this.waterRenderer.sharedMaterial;
console.log("water color1", this.material.getProperty("waterColor"));
this.material.setProperty("waterColor", Color.fromHEX(new Color, "#056ADA"));
console.log("water color2", this.material.getProperty("waterColor"));
waterColor: { value: [0.172, 0.463 , 0.435, 1.0], editor: { displayName: Water Color, type: color } }
log结果,这个问题很久远了,一直没有人修。