#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);
}