Hair Streaming Bug

Hi Yann,

Interesting! Wouldn’t be safer/simpler to just recreate the render data for all components? Something like that:

for (TObjectIterator<UGroomComponent> HairStrandsComponentIt; HairStrandsComponentIt; ++HairStrandsComponentIt) { if (HairStrandsComponentIt->IsRegistered()) { HairStrandsComponentIt->InvalidateAndRecreate(); } }If you don’t have much groom components, this is probably simpler.

Otherwise if you want to stick with your approach, you probably need to track when components get unregistered, to remove them from the array. Also maybe you need to change to a struct which is threadsafe (Not sure if all registering happen on the gamethread). You would also needs to clear the array once you have processed all the groom recreation, no?

/Charles.