Animation sharing

So i created animation sharing from tutorial by epic( Animation Sharing Plugin in Unreal Engine | Unreal Engine 5.7 Documentation | Epic Developer Community )

But the problem is that when i spawn actors(100) than start to destroy them, the engine just crashes. And the main problem is that reference from destroyed actor is still flowing trough even tho memory is cleared.

So the question is how to remove actor(unregister) from animation sharing manager?

Hey @Iscreamdeye how are you?

In order to provide a good solution for your problem, could you share with me your Actor’s blueprint?

I’d like to replicate the issue, and know how are you destroying it and how it is being registered to the Animation Sharing pool.

It would be great if you can share with me the crash log as well. So I can dive a little bit deeper into the issue.

I’ll be waiting for you answer!

1 Like

Hi, thank you for response!

UEMinidump.dmp (898.3 KB)

CrashReportClient.ini (160 Bytes)

CrashContext.runtime-xml (154.0 KB)

Arenashooter.log (3.7 MB)

Here is a video of the problem:

1 Like

le dot

Hello again @Iscreamdeye how are you?

Sorry for the delay! I’ve been searching and I found “Unsuscribe Actor” exists in C++ but it is not exposed to blueprints. So you won’t be able to use it if you don’t code and build externally.

So I could only reach to the same conclusion as you: add an “Is Valid” check before processing the animation state.

That is a problem because you are continuosly spawning actors and adding them to the pool, checking if they are valid frame by frame even if they don’t exist anymore… This makes me think it is a plugin more focused on NPCs than on enemies.

Maybe you can try different methods instead of Animation Sharing. Let me suggest a few:

  1. Animation Budget Allocator: You can use the Animation Budget allocator to reduce the cost of many animating characters, by setting a processing budget, that the Budget Allocator will dynamically throttle Skeletal Mesh Component animation ticking.

  2. AnimToTexture: Which can render costly Skeletal Mesh animations into hyper optimized Static Mesh animations.

Both have its pros and cons, but they will work better for enemies!

Sorry for not being able to really solve your problem! But hope this helps you anyways!

EDIT: I forgot to mention something! In your animation blueprint, the variable “Blend Bool” is a variable that already exists within the plugin! You only need to search for it, not create it there:

1 Like

Thank you so much! I will check it out! And this is better than nothing. I will start to learn C++, because i still need to learn it.
Once again thank you!