Ahh, this explains everything. I’m still using Unreal 5.2, and this class seems to be something newly added in 5.3 - HeterogeneousVolumeComponent.h - #include "HeterogeneousVolumeComponent.h"
Well, the module for that should be Engine
but I highly doubt you wouldn’t use it already.
At first, I thought this might be happening because said Component is declared under “Classes” directory instead of “Public”, but I just tried to instantiate a different Component from that place:
#include "CoreMinimal.h"
#include "Components/InputComponent.h"
void UMyComponent::MyFunction()
{
for (int i = 0; i < 10; ++i)
{
if (UInputComponent* InputComp = NewObject<UInputComponent>(this, FName(*FString::Printf(TEXT("Input Component %d")))))
{
UE_LOG(LogTemp, Warning, TEXT("Spawned"))
}
}
}
and for me it compiles just fine, so there must be an issue somewhere else…