用c++ 添加全局蓝图函数

必须继承UBlueprintFunctionLibrary

蓝图方法定义成static 

添加蓝图宏 UFUNCTION(BlueprintCallable,Category="Custom|myfun")


UCLASS()
class CREATEBPLINKLIB_API UMyBPCallFunction : public UBlueprintFunctionLibrary
{
GENERATED_BODY()


public:
UFUNCTION(BlueprintCallable,Category="Custom|myfun")
static void GetCustomName(FString& myName);

/*
abc
*/
UFUNCTION(BlueprintCallable,Category="Custom|myfun")
static void SetCustomName(FString setName,FString& custom);
};

 

posted @ 2018-12-13 13:29  谋定而后动?  阅读(307)  评论(0)    收藏  举报