# CustomThunk on top of UBlueprintAsyncActionBase not working

**URL:** <https://forums.unrealengine.com/t/customthunk-on-top-of-ublueprintasyncactionbase-not-working/1839507>\
**Category:** Programming & Scripting\
**Tags:** async, unreal-engine, custom-nodes, Blueprint, CPP, question\
**Created:** [May 4, 2024, 10:24am UTC](https://forums.unrealengine.com/t/customthunk-on-top-of-ublueprintasyncactionbase-not-working/1839507 "2024-05-04T10:24:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sulleyyyyyy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sulleyyyyyy](https://forums.unrealengine.com/u/Sulleyyyyyy)\
**Post date:** [May 4, 2024, 10:24am UTC](https://forums.unrealengine.com/t/customthunk-on-top-of-ublueprintasyncactionbase-not-working/1839507/1 "2024-05-04T10:24:06Z")

</div>

Hi, I would like to write an async blueprint node accepting a wildcard variable, so I used CustomThunk and UBlueprintAsyncActionBase, something like this:

```c++
class COMPONENTCAMERASYSTEM_API UEAsyncSetPropertyAction : public UBlueprintAsyncActionBase
{
	GENERATED_BODY()

private:
	void InternalTick();
	void InternalComplete();

public:
	UPROPERTY(BlueprintAssignable)
	FAsyncSetPropertyOutputPin Tick;

	UPROPERTY(BlueprintAssignable)
	FAsyncSetPropertyOutputPin Completed;

	UFUNCTION(BlueprintCallable, CustomThunk, meta = (BlueprintInternalUseOnly = "true", WorldContext = "WorldContextObject", CustomStructureParam = "Value"))
	static UEAsyncSetPropertyAction* SetPropertyByName(const UObject* WorldContextObject, UObject* Object, FName PropertyName, const int32& Value);
	DECLARE_FUNCTION(execSetPropertyByName)
	{
		P_GET_OBJECT(UObject, Object);
		P_GET_PROPERTY(FNameProperty, PropertyName);

		Stack.StepCompiledIn<FProperty>(NULL);
		void* ValuePtr = Stack.MostRecentPropertyAddress;
		FProperty* Valueproperty = Stack.MostRecentProperty;

		P_FINISH;

		P_NATIVE_BEGIN;
		UEAsyncSetPropertyAction* Action = NewObject<UEAsyncSetPropertyAction>();
		P_NATIVE_END;
	}

	virtual void Activate() override;

```

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/1/fd1434c5adffee2342b56ae49c56a9e387cebc50.jpeg)

However, when I feed any type of variable into Value, it says the type of Value is undetermined. Is there any solution to this issue without writing a K2Node?

---

<div class="post-metadata">

**Author:** ![Sulleyyyyyy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sulleyyyyyy](https://forums.unrealengine.com/u/Sulleyyyyyy)\
**Post date:** [May 9, 2024, 6:05am UTC](https://forums.unrealengine.com/t/customthunk-on-top-of-ublueprintasyncactionbase-not-working/1839507/2 "2024-05-09T06:05:35Z")

</div>

Seems like a non-trivial problem. In the end I turned to use Latent function with multiple output exec pins. The problem with latent functions is you must maintain a FPendingLatentAction structure and this sometimes could not be flexible in terms of accessibility.

BTW, CustomThunk can be used together with Latent and ExpandEnumAsExecs meta specifiers. So I was wondering there should be no reason that CustomThunk cannot be used with UBlueprintAsyncActionBase. Idk if this is a bug or there is some other reason for this.
