// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "UObject/Interface.h"
#include "MyInterface.generated.h"
// This class does not need to be modified.
UINTERFACE(MinimalAPI)
class UMyInterface : public UInterface
{
GENERATED_BODY()
};
/**
*
*/
class GENERALFRAMEWORK_API IMyInterface
{
GENERATED_BODY()
// Add interface functions to this class. This is the class that will be inherited to implement this interface.
public:
// 纯虚函数,实现类必须实现接口
virtual void MyInterface_PureVirtual() = 0;
// 虚函数,在接口本身的 .h 或 .cpp 文件中提供默认实现.实现类可覆盖
virtual void MyInterface_Virtual();
//实现类可以在蓝图和C++中实现接口
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
void MyInterface_NativeEvent1(int32 number);
//实现类在蓝图中实现接口
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void MyInterface_ImplementableEvent();
};