Forum Discussion

KevinJardine's avatar
KevinJardine
Start Partner
8 months ago

Cloning Custom UI?

I really appreciate all the help and hints that I've gotten here.
 
Another question, that I hope will be easy. I want to create a Custom UI that allows a player to view their current inventory. Currently I have a Custom UI hidden somewhere. If the player presses a menu button, the UI is moved to the player and made visible so the player can interact with it. That works fine, but what if two players at different locations want to view their inventory at the same time?
 
I have tried to find a way to clone a UI and then delete it when the user is done with it, but I can find no docs on how to do this. Any suggestions?

2 Replies

  • According to the discord, there is no way to do this currently and I will need to code some kind of Custom UI pool system to manage this. Is this correct?

    • KevinJardine's avatar
      KevinJardine
      Start Partner

      I have implemented a pool system for my Inventory Custom UI. There is a pool of 5 widgets - when a player presses their menu button, one of these is moved to within a few meters of the player, made visible and displays the player's inventory for 10 seconds before being returned to the pool.