PerInstanceCustomData not working for HISM in standalone mode and packaged project

Hi, PerInstanceCustomData doesn’t seem to work for Hierarchical Instanced Static Mesh in standalone mode or packaged project but works fine with PIE mode (although selected version says 4.26 preview but this exists in 4.26.0 as well). It works completely fine for Instanced Static Mesh but not for HISM. You can see it in the attached images. Green highlighted are instanced static meshes while the red highlighted ones are hierarchical instanced static meshes. Attaching a small 4.26 test project with the issue.[link text][1]

Hello,

We’ve made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

Thanks

After some digging, I was able to get it working in standalone and packaged mode but it involves C++. You need to have the HISM component created in c++ (let’s say its called “HISM_Comp”). Then, after setting custom data value on all the required instances, you need to call BuildTreeIfOutdated function like this:

HISM_Comp->BuildTreeIfOutdated(/*Async*/ true, /*ForceUpdate*/ false);

Make sure async is true as higher number of instances can cause the game thread to block till the tree is completely built. Not sure if it’s a bug or the intended usage but it does the job.

3 Likes

Thank you very much for posting the answer. Fixed my issue as well.

This exactly solved my problem as well, thank you!

Cool! It worked. It took me quite some time making the component into a plugin that I could put into my blueprint-only project.