[2.1+] BillboardSet Material is lost when pool is resized
Posted: Mon Nov 16, 2020 5:45 pm
If I set the material for a BillboardSet and then at some point in the future have the pool resized then the material is lost and it is reset to the default datablock I think.
What I believe happens;
This appears to be a logical bug, but I am unsure what the best solution would be. Maybe finding the current active datablock in '_createBuffers', or not clearing the mMaterialName in 'setDatablock'?
What I believe happens;
- BillboardSet is first initialised and '_createBuffers' is called which then calls 'setDatablock' or 'setMaterialName'
- 'setMaterialName' eventually calls 'setDatablock' which clears the mMaterialName
- BillboardSet pool is resized and '_createBuffers' is called for a second time
- mMaterialName is now empty and the default HLMS datablock is used instead
This appears to be a logical bug, but I am unsure what the best solution would be. Maybe finding the current active datablock in '_createBuffers', or not clearing the mMaterialName in 'setDatablock'?