So guys, I am making a game where when player purchases weapons on store they are added to inventory, and player can choose which weapon to use from Inventory section which is in Main Menu Scene. So I have some functionality to make my player equip the weapons from the game play scene directly, basically I pass the name of the gun as a string to player script on inspector and it has in when the level runs. What I want to do is make the player equip weapon from the Inventory. I thought I would do something with events when click on weapons I would just pass the weapons name to player script but the issue is I cant reference my inventory class from the player class because they are on different scenes.
How could I approach that issue? I tried making the Inventory a singleton but it didnt work, I might have to change how I set things up for the inventory for it to work and Im not sure if it will. if you have any other ideas please let me know. Thanks.