The uint16 data type can be used in code however it is not recognized by blueprints. The only numeric datatypes that are recognized in blueprints are uint8, int32, and float. If you are doing the calculations in code then you could pass in an int32 from the blueprint and then cast to a uint16 in code to work with.
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);
}
Looking at your video are you able to see the function if you uncheck the context sensitive box in the top-right corner of the right click menu in blueprints? In the MyBlueprint panel you may need to turn on “Show inherited variables.”
When I uncheck “context sensitive” I don’t see the methods appear in the level blueprint or class blueprint.
In “My Blueprint” on the left I see the methods listed. Are you supposed to use “Implement Function” and then force it to invoke the parent? Because I tried that before which crashes the editor. I want to invoke the C++ function vs overriding it. If I wanted to override IIRC I’d use a BlueprintImplementableFunction…
If you are trying to invoke the function rather than override then in the UFUNCTION() declaration you want to use BlueprintCallable rather than BlueprintNativeEvent. If you then create a blueprint based on that class you should be able to add the node to the blueprint.