Null reference exception list C#. from another class.

Okay i got this list in a datamanager class and i access it as dataManager.gameDataManager.playerInventory.Add(“SomeString”); from another class. but it returns null pointer exception. i’m really confused please help. screenshots are attached in this post.

Hi @iPewds,
I’ve got a few questions to try to help work this out.

Have you tried putting a breakpoint on the line that is crashing to see what is null?

When is insertItem() called? Is it possible it’s happening before datamanager Awake is called?