[SOLVED] Why material.name = Untitled? It was right one week ago


var TestMaterial = pc.createScript(‘testMaterial’);

TestMaterial.attributes.add(‘targetModel’, {type: ‘entity’, title: ‘Target Model’ });

TestMaterial.prototype.initialize = function() {

console: Untitled

It was right a week ago or earlier…

plz help me , how to get the Asset Material’s name??

here is my test project PlayCanvas | HTML5 Game Engine

There was a change in version 1.6.3 that was released a few days ago.

That said, The material asset should have the name, the fact that the material resource also had the same name may be an unplanned side effect previously.

v 1.6.2 ‘works’: https://launch.playcanvas.com/635795?debug=true&use_local_engine=https://code.playcanvas.com/playcanvas-1.6.2.js

@dave may be able to help here in terms of whether it’s actually a bug?

This will be fixed in 1.6.5

We now assign the asset name to the material name property again.

Thank you very much !