// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintAsyncActionBase.h"
#include "MyBlueprintAsyncActionBase.generated.h"
/**
*
*/
UCLASS()
class C_TEST_API UMyBlueprintAsyncActionBase : public UBlueprintAsyncActionBase
{
GENERATED_BODY()
public:
//开始创建蓝图节点
UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true",Category = "My_API|123")) //BlueprintCallable:一定要添加,否则在蓝图点击编译的时候会报错
//BlueprintInternalUseOnly = "true":蓝图节点不在图表中直接展现,默认值为false
//Category = "My_API",定义蓝图节点所在组的名称
static UMyBlueprintAsyncActionBase* CustomAsyncBPNode(UObject* World111); //蓝图节点的名称是CustomAsyncBPNode,声明输入节点类型是Object,名称是World111
void Activate() //声明函数Activate的内容
{
GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Yellow, FString(TEXT("11111")));
}
public:
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FBPPin_Result, const TArray<FString>&,Datas);
UPROPERTY(BlueprintAssignable) //创建输出引脚
FBPPin_Result OnSuccess; //输出引脚的名称是OnSuccess
};
编写异步蓝图节点
最新推荐文章于 2023-06-21 17:07:47 发布