Make Multiple Parameters Dependent to ArrayParam

I’m trying to make a UFunction that links more than one Parameter to the Array’s Variable

UFUNCTION(BlueprintPure, Category="CMBPF | Workflow | Array", meta = (DisplayName = "Find - Differentiate Object in Array", Keywords = "Array Find Contains Differentiate Extract Item", ArrayParm = "TargetArray", ArrayTypeDependentParams = "Item, NewExtracted", BlueprintThreadSafe))
	static bool Array_FindObjectInArray(const TArray<UObject*>& TargetArray, int GetIndex, bool Differentiate, UObject* Item, UObject* &NewExtracted);

Where the Variable type may change. What I’m trying to do is to link two Parameters to be Dependent on the Array’s Value. However, I’ve only been able to link just one parameter to it; either Item or NewExtracted, depending on which one I write first.

The question then is:

  • Is there a way to link multiple Parameters to be Dependent to An Array or is the functionality linked to only one parsing?

Hi magfund,

If you remove the space from "Item, NewExtracted" then both of the parameters should change their type in the Blueprint.

Oh, I got the syntax Separation wrong. Thanks!

Never actually got to check this out in practice. Now that I did, it actually doesn’t work out. I’ve read more documentation and it says that it’ll assimilate only one parameter.

How can I assimilate more than 1 parameter?

Hi magfund,

Are you sure? It works for me. This is before connecting the array to the node:

This is after connecting the array to the node:

The Item parameter also expects a static mesh object reference. Here is the C++ code I used in my blueprint function library:

UFUNCTION(BlueprintCallable, Category = "Array Utility", meta = (ArrayParm = "TargetArray", ArrayTypeDependentParams = "Item,OutExtracted", BlueprintThreadSafe))
static bool DoSomethingToAnObjectArray(const TArray<UObject *> &TargetArray, int GetIndex, bool bDifferentiate, UObject *Item, UObject *&OutExtracted)
{
	OutExtracted = nullptr;
	return false;
}