Unable to build towers - Desktop



  • Hello!
    I'm unable to build towers. The InstantiateTower method is called, but only one the first click. The BuyTower method is never called. I've tried to find the error with prints in the methods, but it seems to not call the proper methods. It works on my colleagues computer just fine, and we have the exact same code.

    The only difference is i run it on PC, he runs it on a Mac.

    Help please!



  • Hey there,

    this kit comes with layer & tag presets, which will overwrite your existing settings when imported in a new project. If you imported another complete project after ours, these presets could have been overwritten. Make sure that all layers are actually there ("Grid" on the grid prefab, "Tower" on the tower prefabs, "Enemies" on the enemy prefabs etc.). The UI methods need these layers to place towers onto grids. If they aren't there, please try reimporting the project settings from our package.

    An addition since you didn't mention which scene you are running: the desktop sample scene works on desktop PCs, but the mobile sample scene only considers input on mobile devices.



  • Thanks for the help.

    Is there an easy way to remove the Upgrade tower aspect of the game? It seems to make it too complicated to add new towers.



  • Is there an easy way to remove the Upgrade tower aspect of the game? It seems to make it too complicated to add new towers.

    You only have to add the first upgrade level (0), because this describes the base stats of your tower. You can remove the upgrade button in the UI if you don't want to upgrade towers.


Log in to reply