BlueprintCallable function can't have return value?

hi :slight_smile:

i just googled about it and i am a bit confused. so i hope someone makes it clearly.

i made a getter function that returns a struct that i made. FMy_Struct Get_Struct() { return Struct; } function looks like this. but whenever i compiled, some errors pop up and when i delete that function it compile just well.

so i googled about it and i find that when your c++ code get in to the blueprint, unreal check whether function has reference in input and make it as ‘Output pin’ instead of the return value of function.

So, is BlueprintCallable function can’t have any return value except void?

The return value will be passed through the output pin, so BlueprintCallable functions can have return values. You very likely made another mistake, for example didn’t set USTRUCT(Blueprintable) to your own struct.