::Hey! if you still didn’t resolve the empty level up screen or for anyone else interested here is a temp fix
(no clue if its ideal or w/e.. it just works – Todd howard)
Go in the “InventoryManager” script
Define a new variable
int maxUpgrades = 6;
modify the 6 if your upgrades go to a higher/lower level
Then scroll down to
void ApplyUpgradeOptions()
and then replace the first few lines to this
<code> List<WeaponUpgrade> availableWeaponUpgrades = weaponUpgradeOptions
.Where(weaponUpgrade => weaponUpgrade.weaponData.Level < maxUpgrades)
.ToList();
List<PassiveItemUpgrade> availablePassiveItemUpgrades = passiveItemUpgradeOptions
.Where(passiveItemUpgrade => passiveItemUpgrade.passiveItemData.Level < maxUpgrades)
.ToList();
if (availableWeaponUpgrades.Count == 0 && availablePassiveItemUpgrades.Count == 0)
{
GameManager.instance.EndLevelUp();
}
//REST OF THE CODE
foreach (var upgradeOption in upgradeUIOptions)</code>
Additionally I added a do…while loop inside each upgradeType which rerolls the chosenWeaponUpgrade && chosenPassiveItemUpgrade IF their level is maxUpgrades(6).
Here for weapon (find the if upgrade type = 1):
<code> if (upgradeType == 1)
{
WeaponUpgrade chosenWeaponUpgrade;
do
{
chosenWeaponUpgrade = availableWeaponUpgrades[Random.Range(0, availableWeaponUpgrades.Count)];
availableWeaponUpgrades.Remove(chosenWeaponUpgrade);
} while (chosenWeaponUpgrade.weaponData.Level == maxUpgrades);
//REST OF THE CODE
if (chosenWeaponUpgrade != null)</code>
And here for passive (find the if upgradetype = 2):
<code> else if (upgradeType == 2)
{
PassiveItemUpgrade chosenPassiveItemUpgrade;
do
{
chosenPassiveItemUpgrade = availablePassiveItemUpgrades[Random.Range(0, availablePassiveItemUpgrades.Count)];
availablePassiveItemUpgrades.Remove(chosenPassiveItemUpgrade);
} while (chosenPassiveItemUpgrade.passiveItemData.Level == maxUpgrades);
//REST OF THE CODE
if (chosenPassiveItemUpgrade != null)</code>
sorry for the wall of text hope it helps
also not sure if the code tags worked
lol