[Blueprint] Thread Safe Animation + Override of Pure Function not Calling Subclass Implementation

First of all I’m using Blueprints for the following scenario. So there is nothing related to C++.

I have the following scenario:

  • I’m using Thread Safe Update Animation for my Animation Blueprint
  • I have a base class which has a thread safe pure function to check an animation status
  • The function is called using Property Access from the base class. E.g. BaseClass.GetStatus
  • Then I have a subclass which overrides that function

My problem is that when running the Animation Blueprint the base class function is called instead of the subclass one.

Anyone knows how to fix it?

Does the get status look something like this in the child class?

getStatus

If so then remove the parent: Get Status. It’s the equivalent of calling Super::GetStatus, so the status in the parent class. And as that has a return value it’s probably preemptively returning the parent status, ignoring the child.

Cut out the parent node and connect to the correct return node.

No. I don’t call the parent function.

Base class implementation

Subclass implementation

Function being called
Screenshot 2024-07-04 152739

Make sure you are debugging the child actor

Here it fires the pure threaded function returning true for the child / inherited actor (Attack animation option set to 1 and animation state set to attack on default)

It is still calling the base class :confused:
Screenshot 2024-07-04 161613

What is the character variable stated as? If it’s of type parent then it will call the parent function. If only there was a way to access the interface functions from safe update…

It is the base class. So there is no way to access the subclass method in this case?

Even tried making a c++ base class to see if that had any changes adding thread-safe, pure and virtual.

It’s getting the child actor because I can see the name is with a child in it. But it calls the parent function. Maybe only hope would be if Epic can expose pure thread-safe to interfaces (they can be marked as thread-safe already).

Hopefully there is a workaround somewhere on the net.

1 Like

Yep… using variables instead of methods may be the only solution for my case.

Direct var seems to work ok when not as a function
directVar
added bIsMirrored and accessing it via Character.bIsMirrored through property access.

Yes. I have done that as well and it works flawlessly. :slight_smile:

1 Like

Looks like we both learned a thing or two about thread safe animation in the process :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.