External Link Issue when inheriting from FInstancedStaticMeshSceneProxy

I upgraded to UE 5.4.1 and have the following which worked in 5.3.*:

.h

// inherit from intanced static mesh scene proxy
class FInstanceSceneProxy : public FInstancedStaticMeshSceneProxy
{
public:

FInstanceSceneProxy(UInstancedStaticMeshComponent* InComponent, ERHIFeatureLevel::Type InFeatureLevel);

SIZE_T GetTypeHash() const override;
virtual bool GetInstanceDrawDistanceMinMax(FVector2f& OutDistanceMinMax) const override;

};

.cpp

FInstanceSceneProxy::FInstanceSceneProxy(UInstancedStaticMeshComponent* InComponent, ERHIFeatureLevel::Type InFeatureLevel)
: FInstancedStaticMeshSceneProxy(InComponent, InFeatureLevel)
{
}

SIZE_T FInstanceSceneProxy::GetTypeHash() const
{
static size_t UniquePointer;
return reinterpret_cast<size_t>(&UniquePointer);
}

bool FInstanceSceneProxy::GetInstanceDrawDistanceMinMax(FVector2f& OutDistanceMinMax) const
{
if (UserData_AllInstances.EndCullDistance > 0)
{
OutDistanceMinMax = FVector2f(0.0f, UserData_AllInstances.EndCullDistance);
return true;
}
else
{
OutDistanceMinMax = FVector2f(0.0f);
return false;
}
}

when I compile I get:

1>InstanceSceneProxy.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FInstanceDataUpdateTaskInfo * __cdecl FInstancedStaticMeshSceneProxy::GetInstanceDataUpdateTaskInfo(void)const " (?GetInstanceDataUpdateTaskInfo@FInstancedStaticMeshSceneProxy@@UEBAPEAVFInstanceDataUpdateTaskInfo@@XZ)
1>InstanceSceneProxy.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl FInstancedStaticMeshSceneProxy::SetInstanceCullDistance_RenderThread(float,float)” (?SetInstanceCullDistance_RenderThread@FInstancedStaticMeshSceneProxy@@UEAAXMM@Z)

And I have the public/private dependencies in build.cs:

	PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "RenderCore", "Renderer", "RHI" });

	PrivateDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "RenderCore", "Renderer", "RHI" });

How do I solve this or submit a bug report?

these are two virtual functions so you could try to override them and just call the Super in the code. I suppose you might want to clean your builds too and refresh file projects (basically wiping Intermediate folder and regenerate project files)

GetInstanceDataUpdateTaskInfo and SetInstanceCullDistance_RenderThread are not exposed outside the engine module (they are missing the ENGINE_API).

If you compile the engine yourself, you could add it to fix the problem otherwise you could try to submit a bug report that you need those functions exposed to be able to inherit from FInstancedStaticMeshSceneProxy.