Creating a Blueprint implementable function in C++

So, I know there are tons of questions out there asking the same thing, but i cannot seem to get anything to work.

This is what i tried:


	void SetInventoryItemsGUI_Implementation(TArray<FText> items);


void APlayerCharacter::SetInventoryItemsGUI_Implementation(TArray<FText> items){


I am getting these errors:

\HorrorGame\Intermediate\Build\Win64\UE4Editor\Inc\HorrorGame\HorrorGame.generated.cpp(160): error C2511: 'void APlayerCharacter::SetInventoryItemsGUI_Implementation(const TArray<FText,FDefaultAllocator> &)' : overloaded member function not found in 'APlayerCharacter'

\HorrorGame\Source\HorrorGame\PlayerCharacter.h(18) : see declaration of 'APlayerCharacter'

HorrorGame.generated.cpp(163): error C2352: 'UObject::FindFunctionChecked' : illegal call of non-static member function

c:\program files\epic games\4.9\engine\source\runtime\coreuobject\public\uobject\UObject.h(752) : see declaration of 'UObject::FindFunctionChecked'

At base declaration, you declere native event without _Implementation surrfix

void SetInventoryItemsGUI(TArray<FText> items);

UHT will generate _Implementation deceleration automatically so you don’t need to declare it, but in farther subclasses you override implementation using the surrfix like this:

virtual void SetInventoryItemsGUI_Implementation(TArray items) override;

and always you define (code) function with that surrfix where ever you use it, so don’t change anything in cpp

I just tried this, and yet im getting the same error

change argument to as error say that generated code wants

const TArray<FText> items


TArray<FText>& items

AH, its magic, it works, I tried making it a static function. Cant believe I didnt think of that, thanks

actually its not showing up in the blueprint

I also tried changing it to a BlueprintImplementableEvent, and then got rid of everything in the .cpp file

Where do you looking? do you look for event or function override? if you dont see in one it will be in another. If i remeber right it depends on if your function return anything or not

I checked both, and then searched it, but I will check again, I also tried searching it by right clicking and putting in the name

turns out hot reload does not work, its in there now

Ok :slight_smile: yea hot reload is buggy