Cannot use SetNiagaraArrayVector

I get the error cannot access private member declared in class when trying to nativize a blueprint including the node Niagara Set Vector Array.
Engine version : 4.26.2

error C2248: ‘UNiagaraDataInterfaceArrayFunctionLibrary::SetNiagaraArrayVector’: cannot access private member declared in class ‘UNiagaraDataInterfaceArrayFunctionLibrary’
UATHelper: Packaging (Windows (64-bit)): C:\Program Files\Epic Games\UE_4.26\Engine\Source…/Plugins/FX/Niagara/Source/Niagara/Classes/NiagaraDataInterfaceArrayFunctionLibrary.h(24): note: see declaration of ‘UNiagaraDataInterfaceArrayFunctionLibrary::SetNiagaraArrayVector’
UATHelper: Packaging (Windows (64-bit)): C:\Program Files\Epic Games\UE_4.26\Engine\Source…/Plugins/FX/Niagara/Source/Niagara/Classes/NiagaraDataInterfaceArrayFunctionLibrary.h(12): note: see declaration of ‘UNiagaraDataInterfaceArrayFunctionLibrary’

Hi.

Yes I’ve just gotten this too. I’m not sure if its a build-order issue, but the problem is caused by the fact that this file doesn’t declare the functions as public:

NiagaraDataInterfaceArrayFunctionLibrary.h

The class makes used of the GENERATED_BODY() macro, which (I’m fairly sure) is meant to add the public specifier, but clearly something isn’t working correctly.

If you’re building the engine from source (like me) then the fix is very simple, just add a public specifier below the GENERATED_BODY() macro, and it all works fine.

Hope that helps.