How to Change the Inventory Panel Owner ?

oscarleif

New member
Hello

I have this little issue. How do you change the Owner of the display Manager?
I have 2 characters one have a different inventory and currency, both use the same data base.

When the game starts, the first time it works fine.
But I want to switch the display manager now I want to display the inventory of the 2 character.
I try with
Code:
//Can I use the same character Id?
//Both character are like the main player
DisplayPanelManager.SetPanelOwner(character2)
But this is not working it only works the first time.
 
The way the system works is that each panel (inventory grid, equipment, etc...) check for the inventory. If it cannot find one it uses the panel owner invnetory. But once it has a reference to the inventory it no longer looks for a new one.

When using multiple characters, we usually use multiple DisplayPanelManagers, one for each player, but that's mostly because you may want to show both inventories on the screen at the same time.

So you have two choices, either manually change the Inventory for each panel (Inventory Grid, ItemSlotCollectionView, etc...) or have one DisplayPanelManager canvas each with their own panels, Inventory Grid, etc... for each player.

I hope that helps
 
Top