Description

When overriding a BlueprintNativeFunction in a child class, if the inheritance is multiple levels deep, the override does not work correctly. As shown in the reproduction steps, this the example to show this:

Parent is a class with a function called "TestFunc", it returns a boolean and is unimplemented. Child is a blueprint based off of Parent which overrides TestFunc and adds a Print String to it. Grandchild is a blueprint based off of Child and also overrides TestFunc by adding a print string. The test setup is that an instance of Grandchild is placed in the level and TestFunc is called in the level blueprint.

If everything is done in this order, it works correctly. If Child's override is created after Grandchild's override however, Child's override is used when calling TestFunc on Grandchild.

Note: This does not occur with functions that return Void due to the difference in how they are overridden.

Regression?: No
While this was not the same functionality in 4.14, the function wasn't called at all in 4.14 so the behavior has at least improved since.

Steps to Reproduce
  1. Download the attached project
  2. Open the Untitled level
  3. Inside of "Child", override the "TestFunc" function (inherited from its parent). Remove the parent function call and place a Print String in the function that prints "Child"
  4. Inside of Grandchild, do the same thing as the previous step but make the Print String print "Grandchild"
  5. Press Play
  6. Notice that Grandchild is printed, as expected
  7. Remove the TestFunc function override from Child and add it again, same as before (Step 2) and compile the blueprint
  8. Press Play
    Result: Child is printed
    Expected: Grandchild is printed

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

1
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint
Affects Versions4.144.154.16
CreatedMar 9, 2017
ResolvedAug 18, 2021
UpdatedAug 18, 2021
View Jira Issue