NiagaraDataInterfacePhysicsAsset.h and GroomComponent.h in Unreal 5.1 - header not found

According to Unreal Engine 5.1 release notes:

Disabled dependency on the HairStrands plugin for Niagara Fluids. Old assets may now fail to run properly without manually enabling the HairStrands plugin for access to the NiagaraDataInterfacePhysicsAsset class.

I’m using the HairStrands plugin and after migrating to Unreal 5.1 from 5.0, my project fails to compile. I’m getting a message that the header NiagaraDataInterfacePhysicsAsset.h, included in the file GroomComponent.h in the HairStrands plugin, was not found.
I could find that exact file in Plugins/FX/Niagara/Source/Niagara/Classes. What should I do to be able to run my project? Everything I’ve tried so far has failed and there is no info on the internet other than the release note. What does “Manually enabling the HairStrands plugin for access (…)” mean? What can I do?

8 Likes

I am also experiencing this same problem.
@TomaszKalisiak

add “Niagara” to your “PublicDependencyModuleNames” in your Projectname.Build.cs file

Example : PublicDependencyModuleNames.AddRange(new string[] { “Core”, “CoreUObject”, “Engine”, “InputCore”,“Niagara” });

11 Likes

Thank you, it helped!

1 Like

I’ve got the same problem, but with a plugin, any idea on how I would go about fixing it?

1 Like

Thank you so much!!!

Thank you so much !!! This problem waste lots of my time !

Now getting this error?

Unreal Engine\UE_5.2\Engine\Plugins\Runtime\HairStrands\Source\HairStrandsCore\Public\GroomComponent.h(24): error C2143: syntax error: missing ‘;’ before ‘’

I’ve got the same problem, but with a plugin, any idea on how I would go about fixing it?

Thank you! It helped!