标签:function printf 使用 public esc project plink ext ring
#pragma once #include "CoreMinimal.h" #include "Kismet/BlueprintFunctionLibrary.h" #include "MyBPCallFunction.generated.h" DEFINE_LOG_CATEGORY_STATIC(myLog, Log, All); //UE_LOG(myLog,Log,TEXT("name = %s"),*customName); /** * */ 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); };
// Fill out your copyright notice in the Description page of Project Settings. #include "Public/MyBPCallFunction.h" void UMyBPCallFunction::GetCustomName(FString& myName) { myName = "hello!"; } void UMyBPCallFunction::SetCustomName(FString setName,FString& customName) { //customName = setName; customName = setName.Append("abc"); UE_LOG(myLog,Log,TEXT("name = %s"),*customName); }
UE 用C++ 扩展FunctionLibrary 蓝图以供全局函数使用
标签:function printf 使用 public esc project plink ext ring
原文地址:https://www.cnblogs.com/mayichen0823/p/10401021.html