[英]My wrapper function is missing a variable?
由于我遇到了一个特殊的错误,我决定像这样包装一个 function 来解决上述错误:
UFUNCTION()
void OnBoxOverlapWrapper(UPrimitiveComponent* /*ignored*/, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherIndex, bool bFromSweep, const FHitResult & SweepResult)
{
OnBoxOverlap(OtherActor, OtherComp, OtherIndex, bFromSweep, SweepResult);
}
但是,当我尝试编译我的代码时,设置 OnBoxOverlapWrapper 的行会产生以下内容: Error: Missing variable name
。 这是唯一一次在 function 中声明包装器,所以这不应该发生。 特别奇怪的是,当我对另一个 function 使用类似的包装器时,它并没有产生这样的错误:
UFUNCTION()
void OnBoxEndOverlapWrapper(UPrimitiveComponent* /*ignored*/ AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherIndex)
{
OnBoxEndOverlap(OtherActor, OtherComp, OtherIndex);
} //this code does not produce an error
这里发生了什么?
原来你需要为OnBoxOverlap
function 写一个主体。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.