Why can't I declare a function with an array of structs?

I’m trying to create a function I can call from C++ to deliver an array of structs to a blueprint. If I declare the function with a single instance of the struct, it works fine:

	UFUNCTION(Category = "Cutscene", BlueprintCallable, BlueprintImplementableEvent)
	void ProcessBlocking(FCutsceneBlockingData blocking);

However, changing it to an array produces a compiler error, to wit “error C2511: ‘void ACutscenePlayer::ProcessBlocking(const TArray &)’: overloaded member function not found in ‘ACutscenePlayer’”.

	UFUNCTION(Category = "Cutscene", BlueprintCallable, BlueprintImplementableEvent)
	void ProcessBlocking(TArray<FCutsceneBlockingData> blocking);

That sounds to me like it’s finding a second function named ProcessBlocking and trying to use my newly-declared one as an override, not a new and original method. I’ve verified that nothing else is named ProcessBlocking, and changing the function name to something weird like “TestFunction1101” produces the same error, so I know it’s not an issue with the name… is there an obvious problem with the way I’m doing this?

like this

   UFUNCTION(Category = "Cutscene", BlueprintCallable, BlueprintImplementableEvent)
    		void ProcessBlocking(TArray<FCutsceneBlockingData> &blocking);

or this depending what you need

UFUNCTION(Category = "Cutscene", BlueprintCallable, BlueprintImplementableEvent)
		void ProcessBlocking(const TArray<FCutsceneBlockingData> &blocking);

Oh hey, that works perfectly, thank you! :slight_smile:

Out of curiosity though, why does it work? & usually refers to the memory address, not the value, so is it just a requirement of C++ that structs are passed with their address, and not their value?