I made a video for my C++/BP question.
http://img.youtube.com/vi/a4NlueF948g/0.jpg
I'm trying to get a class blueprint to call my C++ code.I made a class that extends an AActor.
UCLASS()
class INAPPPURCHASES_API AOuyaSDK : public AActor
{
/* Tried making a delegate so it appears as a function on the actor in Unreal */
DECLARE_DELEGATE_RetVal_OneParam(bool, OuyaGetAnyButtonDelegate, uint16)
OuyaGetAnyButtonDelegate OuyaGetAnyButtonHandler;
/* Check if the OUYA Button is pressed, true when pressed */
UFUNCTION(BlueprintNativeEvent, Category = OUYA)
bool OuyaGetAnyButton(uint16 button);
}
In my cpp implemented the function.
bool AOuyaSDK::OuyaGetAnyButton_Implementation(uint16 button)
{
return false;
}
And in the constructor, bind the function.
AOuyaSDK::AOuyaSDK(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
OuyaGetAnyButtonHandler.BindUFunction(this, "OuyaGetAnyButton");
}
Adding a custom event or just being able to invoke “OuyaGetAnyButton” doesn’t seem to be working for me…