What is an AnimInstance (theory question)?

It is not clear to me what exactly is an animation instance / animinstance / uaniminstance class.

Is it an instance of an animation blueprint?

In other words, say 5 characters are in a level, all are using the same animation blueprint. Does each one of them use a different animinstance?

If not, then what is it? Can somebody elaborate? This is a theory question.

2 Likes

I think it pretty much is just the Anim Blueprint… when you “set anim instance” you’re literally just setting the anim blueprint…
if you set the same anim blueprint for a bunch of different dudes… there will be different “instances” of it… ya know… otherwise like… they’d all look the same i guess right?

Hello,

My explanation requires a little bit of C++ knowledge (knowledge of C++ classes and objects).

Anim instance you are referring to is a C++ object of class UAnimInstance.
Animation Blueprint (AnimBP) is in fact a class derived from UAnimInstance (or from any class which inherits from it).
In default, you create your animation blueprint just from standard UAnimInstance and extend it solely in blueprint – in C++ semantics: UAnimInstance is a base class of your blueprint.

Example:
In C++, I define my own class UMyAnimInstance which inherits from Epic’s UAnimInstance because I want to extend or modify its functionality (in some way) in C++. Later in the editor, I can create an animation blueprint which derives from my UMyAnimInstance (instead of default UAnimInstance) which allows me to create state machines, animation states and blending trees which may use my extended functionality.

I think that all these are not of any use for you if you are not using C++ in your project and you are not programming your game in C++. On the other hand round, I recommend to learn C++ and use it as it opens Unreal engine for you immensely.

2 Likes