So far so good ! Except that I can spawn on-top of my defenders. Not sure how to fix this. Been tinkering around with no luck.
My canvas has a different Z axis , my defenders have the same z axis and layer (except for star on the trophy- different layer) , they all have box colliders with triggers.
When I go in my Defender script - they don’t detect collisions with one another (when spawned ontop) - was going to destroy the object if spawned ontop of each other but that wont work.
I re-watched the video from part 18:18 and it made more sense 8th time around(haha)
the box collides are blocking the screenToWorldPort from creating something on the game space.
This issue with this is, my box colliders are the size of my instantiated sprites. I would have to make it so it takes up the whole square play space in order to prevent clicking at the edges of the blocks to create extra clones.
This is the structure that Ben made for this section (and fits pretty well to the learning curve), so the solution pointed in the class does fit the overall game structure.
There are better options IMO, but would require more advanced tile based structures to work.
I’m encountering the same problem. The defenders boxes are squared out, but still I have a defender now and then who can be placed on another. I’m using Ben’s defspawn script. (Im bookmarking this thread for later resolve)