Home Game Development UIMeshrenderer not working Cocos Creator 3.6 – Cocos Creator

UIMeshrenderer not working Cocos Creator 3.6 – Cocos Creator

0
UIMeshrenderer not working Cocos Creator 3.6 – Cocos Creator

[ad_1]

When I run my challenge on cell and alter the fabric of the 3D mannequin within the script then it disappears from the UI.

In Cocos Creator 3.5.2 it work effectively. I’m utilizing Cocos Creator 3.6.0

How did you alter the fabric? What did the fabric change to?

updateModel(knowledge: DataSkin) {

    let fashions = this.carModelContainer.getComponentsInKids(MeshRenderer);

    // console.log(fashions, knowledge.materials);

    sources.load(knowledge.materials, Material, (err, res) => {

        if (!err) {

            for (let j = 0; j < fashions.size; j++) {

                var mannequin = fashions[j];

                // mannequin.node.getComponent(UIMeshRenderer).enabled = false;

                mannequin.setMaterial(res, 0);

                // mannequin.node.getComponent(UIMeshRenderer).enabled = true;

            }

        }

    });

}

Here is the code to vary the fabric. And the identical factor occurs whenever you set enabled of UIMeshrenderer = false and set to true after.

When I hiding the second background the whole lot effectively works. I feel after I modified the fabric the 3d mannequin layer was hidden underneath the second background.

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here