Map of wildcards Input Parameter

I’m trying to create my own blueprints, I would like them to have an input of a map of wildcards. Ideally a map of “wildcards to floats” would be perfect. I was able to get a an array of wildcards but I’d rather not have two arrays (one wildcards and one float) compared to just a map of wildcards-floats. Even a map of wildcards to wildcards would be alright. I’ve tried many thing but I can’t seem to find any information about ow or if it is possible to create a UFUNCTION with a wildcard map parameter.I tried looking at source code because there is a blueprint “Make Map” which has an output of a wildcard map but I wasn’t able to find that. If I give the map the meta tag as “CustomStructureParam” that makes the parameter a wildcard and it appears to connect find on first glance but it doesn’t show as a map on the blueprint which I find confusing if someone else is going to use the blueprint. Would anyone know or have any clues on making wildcard maps as a parameter?

UProperty* is not valid in 4.25, it has been deprecated by FProperty. So what you are doing here would not be future compatible. What are you actually trying to do? to do wildcards you would need to make you own custom node.

I am trying to make my own custom node. I’m trying to make a node with a map input, preferably a map wildcards to float, with the output also being a wildcard linked to the map’s wildcard type.

UFUNCTION(BlueprintCallable, CustomThunk, meta = (DisplayName = “test function3”, Keywords = “testkeyword”, MapParam = “Options”, MapKeyParam = “Output”, AutoCreateRefTerm = “Options”), Category = “MyProject”)
static void TestFunction3(const TMap<int32, int32>& Options, int32& Output);

	DECLARE_FUNCTION(execTestFunction3)
	{
		// add some code to get params
	}

321511-testfunction3.png

2 Likes

Thanks, this seems to work. Admittedly I have a lot to learn, It seems odd to me that even though you declared int32 the map acts as a wildcard, that seems to go against what I’ve been reading but it seems to work. Also not sure why the declare function has an “exec” added to the front but yet again I have more to learn. Lots to learn. Thanks

Better late then never I guess… I just checked the same for Arrays and found a super sweet solution.
This doesn’t even require the CustomThunk (which at least for me is WAY over my head):

UFUNCTION(BlueprintCallable, Category="MyBP", meta = (
	DisplayName = "Add",
	Keywords = "Array Add",
	ArrayParm = "ArrayIn",
	ArrayTypeDependentParams = "Value"))
static void Array_Add(
	UPARAM(ref) TArray<int32>& ArrayIn,
	const int32 Value,
	const int32 Size = 10);

“ArrayParm” is basically a wild-card for Arrays and the “ArrayTypeDependentParams” sets the second parameter to the same type of the Array. Useful for adding elements etc.

Within the the actual function you can then easily do things like “InArray.Add(Value)”.