Short tutorial of how you can connect to Animation Blueprint you just added to Skeletal Mesh thats inside Pawn or Actor.
Method 1
This method is most common, it makes Animation Blueprint completely independent which you can find out to be useful especially if Skeletal Mesh is meant to swap Animation Blueprints. Also if your Character is C++ Class.
This is how you can create Animation Blueprints. Select the Skeleton of Skeletal Mesh and right click on it.
In Event Graph of Animation Blueprint you’ll find out this. Event Blueprint Update Animation is the Tick of Animation Blueprint. Try Get Pawn Owner is the one which gets the Pawn or Character where this Animation Blueprint is playing.
The first thing you want to do is this. Cast to Character Blueprint.
Then you can put it into variable.
Use Promote to variable to set it.
Now you can do stuff with it like getting the Camera location.
You need to use Is Valid Macro for components. Otherwise you’ll get errors at the start of the game because Pawn and Follow Camera is nullpointer at the start, Animation spawns faster then Character.
Method 2
In this method we add Animation Blueprint reference variable into Character Blueprint. This is good if Skeletal Mesh is not swapping Animation Blueprints and you wan’t to do more stuff in Character Blueprint.
Also you need this if Character Blueprint is using Animation Blueprint Event Dispatchers.
This method allows editing the Animation Blueprint even in realtime.
Right click anywhere and type this. Select Get a reference to self.
Now promote it to variable.
Select the variable and Copy.
Jump to Character Blueprint and Paste.
Then right click it and select Create variable…
Hit compile and…
Now you have the variable in Character Blueprint.
In Animation Blueprint delete the previous variable you pulled out from Self.
Pull out from ThirdPersonCharacter Cast and type the name of Animation Blueprint variable you created in Character Blueprint.
Now the Animation Blueprint updates the variable in Character Blueprint.
If the Skeletal Mesh is not in Pawn but instead in Actor you can replace Try Get Pawn Owner with Get Owning Actor and you’ll get the owning actor.
Method 3
This method is most unpopular. You can use Get Anim Instance and Cast to connecting to Animation Blueprint.
The Winner Is
Only a fool would question the Method 2’s supremacy.
Goodbye.