Search code examples
c++logicunreal-engine4

What does it mean to "Implement an empty logic" for a function in ue4?


I'm following a tutorial for setting up a character interaction, and part of it says to make a header file with the following code:

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();

Then, it tells me to "Implement an empty logic for the UpdateSubtitles function for now." I have no idea what this means, and considering that UpdateSubtitles was the one thing to give me an error when I compiled this code, it's probably something important. Does anyone know what this terminology refers to?


Solution

  • It means to just leave the contents of the function blank or return an empty result such as:

    FString AMyCharacter::GetNickname()
    {
        return "";
    }
    

    in the case where the return type isn't void.