Function to take list of FPrimitiveComponentId's??

Hello,

I’m a bit of a noob with UE c++, or any c++ for that matter.
But I’m trying to make a simple Blueprint node that takes a PlayerController and an array of components (some inside other actors) and calls “PC->UpdateHiddenComponents()”.

Now I have a problem to even define a function that takes the ‘TSet<FPrimitiveComponentId>’ input that the above function expects.

I’m doing stuff like:


UFUNCTION(BlueprintCallable, Category = "xxx")
		static bool UpdateHiddenComponents(APlayerController *PC, TArray<FPrimitiveComponent> compList);

and


UFUNCTION(BlueprintCallable, Category = "xxx")
		static bool UpdateHiddenComponents(APlayerController *PC, TSet<FPrimitiveComponentId*> &compList

);

But I get various error messages that I don’t understand. Some saying that the FPrimitiveComponent datatype is unknown and that I should use UENUM, USTRUCT or UCLASS. But I just don’t know what they mean.

Does anyone know how I need to set this function up?

Cheers

It seems like I got it to work by doing:


UFUNCTION(BlueprintCallable, Category = "xxx")
		static void UpdateHiddenComponents(APlayerController *PC, const TArray<UPrimitiveComponent*>& InCompList);

I then build a new TSet inside the BP code.

Now the problem is that I don’t know what the vector should be that needs to be also fed to PC->UpdateHiddenComponents().
But that might be a question for another post.

Cheers