Hi,
We are seeing an issue with the bFindClosestBody flag on UNiagaraDataInterfaceWater. It seems to be unreliable based on the streaming order of the AWaterBody vs the Niagara emitter. The issue seems to be that it doesn’t search for closest water body unless SourceBodyChangeId changes which means that if the water body streams in after it will never find it. It also breaks in other scenarios like if body is a BP and the SCS runs in editor even if bFindClosestBody=false and it’s explicitly set.
Changing the code in UNiagaraDataInterfaceWater::PerInstanceTick to
// Do we need to update the water body component?
if (InstData->WaterBodyChangeId != SourceBodyChangeId || !InstData->WaterBodyComponent.IsValid())
seems to resolve the issue for us since it looks up the weak pointer again and will find it successfully.
We wanted to pass the fix along, or at least let Epic know about the bug.
Thanks!
[Attachment Removed]