Chapter 35, Killing a building destroys all buildings of that player

Hi,

I have been struggling now at the end of lecture 35. Everything worked perfectly fine till end of Lecture 34.
When I start the game I see the GameOverHandler bases list with both players UnitBases. It updates correctly when I add a building (unitSpawner). This is correctly seen on both players as well, each holding their own buildings (UnitBase and UnitSpawner).

The problems occours when a Unit(tank) destroys another players UnitSpawner. The other whose UnitSpawner got destroyed loses both buildings. This is seen in the GameOverHandler bases list and the player’s MyBuildings list.

Please help as I am lost. No errors in console.

Thank you

[Solved] had the unit base component in unitspawner

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms