Cant get simle C++ function to work in UE4 blueprint.
I am trying to make a C++ function that will sort an array inside blueprint. The problem is i can’t get C++ and UE work together. I need a C++ class that is workable as an example. Can someone point me in the right direction or tell me what am i doing wrong?
.h
#pragma once
#include "Object.h"
#include "FromUobject.generated.h"
UCLASS()
class ANDROID_API UFromUobject : public UObject
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "Damage")
void calcA();
}
Generally you’ll want to include your project’s header file. However, the boilerplate code the editor generates should take care of that for you. How are you creating these source files? If you create a new C++ class from the editor (file menu or the content browser) that sort of stuff will just be taken care of for you.
I am creating classes from UE editor, extending some of the basic C++ classes.
The thing is that after creating some C++ classes, i lose ability to launch project on android device.
Thanks you for your answer, it got me started. Going to dive further.