Closed jmpedrosa closed 1 year ago
Hi @jmpedrosa,
On version 6.x.x MeshUIComponent.set({});
only wrap its own properties. Whereas in 7.x.x it has a default handler that set its property.
In your case, simply go with :
const block = new ThreeMeshUI.Block({...});
block.name = "myblock";
//[...]
const blockByName = scene.getObjectByName("myblock");
Here is a sandbox sample : https://codesandbox.io/s/name-property-7vn09m?file=/src/sandbox.js
thanks, sorry for the late reply. I've been really bussy.
hi, threejs scene method getObjectByName is returning undefined, I realized that although I'm setting the name attribute, either in the block constructor or later on by calling someBlock.set({name:"someName"}) the attribute is not being set.
Is there any other way I could reference the objects on the scene whitout storing them appart?
Thank you for your time.