Guys, I’ve just came from unity to ue4 and I’m really struggling trying to understand blueprints references. I’m having problems trying to get an variable from my main character to its animation blueprint
In your animation blueprint try TryGetPawnOwner ( or something like that autocomplete… ) then cast it to your class and that’s it.
Understanding Blueprint referencing and storing actors in variables took me a couple years before I started feeling comfortable with it. Not completely to your question but, Player Controller, Game Mode, Game Instance and Game State are the only Blueprints that can be accessed from anywhere. Player Controller for example is “Cast To Player Controller” , from object you plug in “Get Player Controller”. For all other Blueprints there needs to be some form of in game interaction or point of storage for you to access said blueprint. For example, on Spawning your character you could store a reference of it in your Player Controller so you can access it any time from there if need be.