Determine Output Pin of BlueprintAysncActionBase

Is this possible? I’m using TSubclassOf to construct my AysncAction and the return pin is always the base class.

i’ve tried meta=(DeterminesOutputType = “ClassType”) and casting but neither seem to work

If you use DeterminesOutputType, you must be sure you adhere to the following rule for your function:

DeterminesOutputType="Parameter": The return type of the function will dynamically change to match the input that is connected to the named parameter pin. The parameter should be a templated type like TSubClassOf<X> or TSoftObjectPtr<X>, where the function’s original return type is X* or a container with X* as the value type, such as TArray<X*>.

What goes on inside of the function?

Are you returning spawned actors or an array based on the input class?
I did a quick test passing in

 UPARAM(ref) TSoftClassPtr<AActor>& inputClass

and was able to successfully capture the specific class.
Though without context on what the output is used for it’s hard to guess if the class isn’t being lost somewhere inside of the code through a transformation / spawn action etc.

the function is just a constructor for the default BlueprintAsyncActionBase,

ive got this to work on normal functions/function librarys so im wondering if it just doesnt work for BlueprintAsyncActionBase or if there is another way to do it.

cheers

i think it just doesnt work with BlueprintAsyncActionBase since thats its own custom K2Node so i just remade the whole system using my own K2Node

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.