Alexa.Ki
(Alendromeda.ki)
June 16, 2022, 9:29am
1
Hi , I want to call the one function from the base class to override under subclass so I don’t need to re-write the new function with the same functionality.
Base Class function:
UFUNCTION(BlueprintCallable, BlueprintPure , Category = "Getter")
void GetDistance(int32& Distance);
I want to call this function in the Sub class to override:
UFUNCTION(BlueprintCallable, BlueprintPure , Category = "Getter")
void GetDistance(int32& Distance) override;
The problem is the code doesn’t compiled with error:
Member Functin doesn’t override the base class member
Thank You
c0r37py
(c0r37py::)
June 16, 2022, 9:31am
2
Alexa.Ki:
UFUNCTION(BlueprintCallable, BlueprintPure , Category = "Getter")
void GetDistance(int32& Distance);
I want to call this function in the base class:
UFUNCTION(BlueprintCallable, BlueprintPure , Category = "Getter")
void GetDistance(int32& Distance) override;
baseclass
UFUNCTION(BlueprintCallable, BlueprintPure , Category = "Getter")
virtual void MyFunction();
subclass
virtual void MyFunction() override;
2 Likes
Alexa.Ki
(Alendromeda.ki)
June 16, 2022, 9:35am
3
Sir, Thank You very much for the quick and perfect solution
1 Like