Y
Y
yraiv2022-04-07 14:22:04
Unity
yraiv, 2022-04-07 14:22:04

How to do this in unity?

How to do the same as in the screenshot? In the sense that the map consists of squares, by clicking on certain ones, objects for purchase appear on the choice, which are placed in the place of this square. It's not done by hand, is it? I thought that tilemaps would help, but they say that they are more responsible for the exterior and that it does not fit here.
624ec95b04ec2370614650.jpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
voproser45654, 2022-04-07
@voproser45654

Here . The code is in lua, but the essence is the same.

N
Nekit Medvedev, 2022-04-08
@NIKROTOS

You create a separate script, hang it on a dummy, when you press the left mouse button, you find out what you clicked on, if it is a cell on which you can build, you take its coordinates and put a tower on them (you refer to the tower selection component).
You can hang all this on the cursor, if it is a separate object, with its own sprite and collider.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question