UE4错误编译由于未知函数EditAnywhere
UE4 error compiling due to unknown function EditAnywhere
我一直在使用 C++ 开发 Unreal Engine 4 游戏,并且我一直在开发破折号函数,但是我遵循了 YouTube 教程,我注意到在视频中,他们使用了函数“EditAnywhere
”但是当我尝试自己编写代码时,我的 UE4 说 EditAnywhere
是未知函数。
我需要满足一些特殊要求才能使用“EditAnywhere
”功能吗?
我的头文件示例代码:
UFUNCTION()
void DoubleJump();
UPROPERTY()
int DoubleJumpCounter;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float JumpHeight;
UFUNCTION()
void Sprint();
UFUNCTION()
void Walk();
UPROPERTY(EditAnywhere)
float WalkingSpeed;
UPROPERTY(EditAnywhere)
float RunningSpeed;
UFUNCTION(EditAnywhere)
void Dash();
UPROPERTY()
bool CanDash;
UPROPERTY(EditAnywhere)
float DashStop;
UPROPERTY()
FTimerHandle UnsedHandle;
UFUNCTION()
void StopDashing();
UFUNCTION()
void ResetDash();
这是错误消息的图片
您不能将 EditAnywhere
与 UFUNCTION
一起使用,只能与 UPROPERTY
一起使用。使函数可由 属性 windows 编辑甚至意味着什么?
有关支持的说明符的完整列表,请参阅 Property Specifiers and Function Specifiers。
你不能拥有 EditAnywhere
的功能!
EditAnywhere
is a property declaration 仅用于变量。
Properties are declared using standard C++ variable syntax, preceded by the UPROPERTY
macro which defines property metadata and variable specifiers.
UPROPERTY([specifier, specifier, ...], [meta(key=value, key=value, ...)])
Type VariableName;
Do I need to meet some special requirements to be able to use the
"EditAnywhere
" function?
编辑功能没有任何意义,但您可以指定功能如何在不同的地方发挥作用(例如:蓝图、虚幻编辑器等)。这是通过 UFUNCTION
declaration 完成的。请参阅给定 link 中的不同声明以进一步阅读。
我一直在使用 C++ 开发 Unreal Engine 4 游戏,并且我一直在开发破折号函数,但是我遵循了 YouTube 教程,我注意到在视频中,他们使用了函数“EditAnywhere
”但是当我尝试自己编写代码时,我的 UE4 说 EditAnywhere
是未知函数。
我需要满足一些特殊要求才能使用“EditAnywhere
”功能吗?
我的头文件示例代码:
UFUNCTION()
void DoubleJump();
UPROPERTY()
int DoubleJumpCounter;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float JumpHeight;
UFUNCTION()
void Sprint();
UFUNCTION()
void Walk();
UPROPERTY(EditAnywhere)
float WalkingSpeed;
UPROPERTY(EditAnywhere)
float RunningSpeed;
UFUNCTION(EditAnywhere)
void Dash();
UPROPERTY()
bool CanDash;
UPROPERTY(EditAnywhere)
float DashStop;
UPROPERTY()
FTimerHandle UnsedHandle;
UFUNCTION()
void StopDashing();
UFUNCTION()
void ResetDash();
这是错误消息的图片
您不能将 EditAnywhere
与 UFUNCTION
一起使用,只能与 UPROPERTY
一起使用。使函数可由 属性 windows 编辑甚至意味着什么?
有关支持的说明符的完整列表,请参阅 Property Specifiers and Function Specifiers。
你不能拥有 EditAnywhere
的功能!
EditAnywhere
is a property declaration 仅用于变量。
Properties are declared using standard C++ variable syntax, preceded by the
UPROPERTY
macro which defines property metadata and variable specifiers.UPROPERTY([specifier, specifier, ...], [meta(key=value, key=value, ...)]) Type VariableName;
Do I need to meet some special requirements to be able to use the "
EditAnywhere
" function?
编辑功能没有任何意义,但您可以指定功能如何在不同的地方发挥作用(例如:蓝图、虚幻编辑器等)。这是通过 UFUNCTION
declaration 完成的。请参阅给定 link 中的不同声明以进一步阅读。