Download

Accessed None Trying to Read Property

Hi everyone,
In my character BP I create an Inventory widget on begin play event and promote it to a variable.
I later access it from my character anim BP, but then I get a Blueprint Runtime Error: “Accessed none trying to read property InventoryRef”.
Anyone know why?

This is most likely because Init Anm is being called before your pawn’s Begin Play. There’s no guaranteed order to this.

What you can do to work around this is implement an interface with your anim BP and send an interface message from your pawn to your pawn’s anim BP after you’ve set up the inventory on your pawn.

If you’re not familiar with interfaces, see this: https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/Types/Interface/index.html

Thanks for the advice! I’ll look into it.