Custom Class Method in Blueprint

That is my first try codding C++ in UE4. So I follow this tutorial I realised all properties but realise class method going with trouble. So even if I add method in public part and add BlueprintCallable parameter and some custom category I still can’t see this method in ue4 editor.

// AMyActor.h
#include "GameFramework/Actor.h"
#include "AMyActor.generated.h"

UCLASS()
class STUDY_API AAMyActor : public AActor
{
GENERATED_BODY()


public: 
    // Sets default values for this actor's properties
    AAMyActor();

    // methods
    UFUNCTION(BlueprintCallable, Category = Damage)
    void CalculateValues();
};

// AMyActor.cpp
#include "Study.h"
#include "AMyActor.h"

// Sets default values
AAMyActor::AAMyActor()
{
}
void AAMyActor::CalculateValues() {
     // some code ...
}

Solve it. I just restart editor.

Did you try to see if it is visible in a Blueprint of your AAMyActor class? It won’t just show up in any blueprint, it would have to be in a blueprint of the class or in another blueprint with a reference to AAMyActor as the target.

Nice! :slight_smile: