How to forbid equipping a slot with the same rune?

moondo

New member
Hello!
I uploaded the image because it might be hard to understand because I'm using a translator

Rune.png




And I want to use the Upgrade Menu in my project, so should I bring the prefep to my scene? or use inventory manager?
 
The Upgrade Menu in teh demo scene is just an example on how a Upgrade system could be built with UIS.
It was not designed to be very flexible. You can learn about other ways UIS can be used to upgrade items here:

So what you are trying to do will require some custom code. The code is fully commented so you should be able to follow trhough even if you are not an expericenced programmer.
The best way to start is copy paste all the code related to the UpgradeMenu. (Which if I remember correctly is the UpgradeMenu and UpgradePanel)

Then in the function where you equip the Runes you'll want to add a check to prevent adding the same type of Rune.
A simple loop over the array of currently equipped runes with a check to see if it uses the same itemDefinition as the item you are trying to equip should do the trick.

I hope this guides you in the right direction
 
Top