【发布时间】:2020-06-09 22:20:42
【问题描述】:
我正在关注设置角色交互的教程,其中一部分说使用以下代码制作头文件:
public:
/*This property will be used in order to bind our subtitles
Binding will make sure to notify the UI if the content of the following
variable change.*/
UPROPERTY(BlueprintReadOnly)
FString SubtitleToDisplay;
/*Updates the displayed subtitles based on the given array*/
UFUNCTION(BlueprintCallable, Category = DialogSystem)
void UpdateSubtitles(TArray<FSubtitle> Subtitles);
/*This array will populate our buttons from within the show function*/
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
TArray<FString> Questions;
/*Adds the widget to our viewport and populates the buttons with the given questions*/
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = DialogSystem)
void Show();
然后,它告诉我“现在为 UpdateSubtitles 函数实现一个空逻辑。”我不知道这意味着什么,并且考虑到 UpdateSubtitles 是在我编译此代码时给我一个错误的一件事,这可能很重要。有谁知道这个术语指的是什么?
【问题讨论】:
-
这不是一个常见的短语。我的猜测是他们的意思是实现(创建定义)函数,并将主体留空。另外,我真的建议买一本 C++ 书,有一个很好的列表 here。虚幻 C++ 并不完全相同,但 C++ 知识是一种很好的可转移技能(尤其是对于游戏而言)。它还可以消除学习虚幻的心痛,并更全面地了解在虚幻中解决问题的方法。
标签: c++ logic unreal-engine4