Hello! I absolutely love your series, and just finished Part 12 (I so can’t wait for the next part!), however, I am encountering a few issues, with one of them being the main topic of this post!
Issue 1:
After I have finished upgrading all of my weapons and passive items to their max levels, the next time I level up will display an empty Level Up screen, and I am unable to continue playing. I lose all functionality, and can’t close the window.
Issue 2:
Every time I exit play mode, I am met with this Null Reference Exception:
“NullReferenceException: Object reference not set to an instance of an object
EnemyStats.OnDestroy () (at Assets/Scripts/Enemy/EnemyStats.cs:70)”
When I look at that particular code block, I’m not seeing anything different from what was suggested in the tutorial. Here is the script:
private void OnDestroy()
{
EnemySpawner es = FindObjectOfType<EnemySpawner>();
es.OnEnemyKilled();
}
Issue 3:
If I choose the Garlic Character (I’ve named him AoE Master lol), and I proceed to play and collect the Knife and Spinach to create my Evolved Knife Weapon, my Garlic Weapon is removed from the primary slot, replaced by my Evolved Knife Weapon, and the Knife weapon that I collected (and was in the second slot) remained, and I was able to level it up. Also, I was able to recollect the Garlic Weapon, but it was always listed as Level 4, and it took up an inventory slot each time I selected it.
Related to inventory slots, each time I’ve reached 5 inventory slots (Elements 0-4 filled), I will receive the “All slots full” message in the console, and I am also unable to continue and exit the Level Up screen. Element 5 is empty when I view the Player Inventory in the Inspector. I have no idea if all of these are related to the issue of multiple instances of a Weapon or Passive appearing in the Level Up screen (I also saw that with a Health Upgrade Item I created that otherwise worked perfectly until it was maxed out).
Any help would be greatly appreciated! Thank you for this wonderful series, and for your time!