-2
\$\begingroup\$

I have a board of tiles in my game in Unity and I have to select a sequence of tiles by moving the pressed mouse over the tiles like if I would select letters in a such game like on the screenshot. Please, hint me, how can I implement this functionality. I'm just a newby in Unity.

enter image description here

\$\endgroup\$
6
  • \$\begingroup\$ What is your build target? Mobile, like in the screenshot, or PC/Linux/Mac? \$\endgroup\$ Commented Nov 16, 2017 at 19:00
  • \$\begingroup\$ Mobile, for Android and iOS. \$\endgroup\$ Commented Nov 16, 2017 at 19:07
  • \$\begingroup\$ I think using the mouse-enter triggers to queue the object id into an array so you have the order is probably the route you'd want to look into. Do a search for mouse-over events. You should get some good examples. I know for a fact there are several youtube videos about object selection. \$\endgroup\$ Commented Nov 16, 2017 at 19:28
  • \$\begingroup\$ if you know how to find those videos, please share them with me \$\endgroup\$ Commented Nov 16, 2017 at 19:35
  • \$\begingroup\$ youtube.com/watch?v=VHeem-mywDk should get you started. Couple with that the check for mouse down and you know the difference between the mouse just passing over, and a selection attempt. \$\endgroup\$ Commented Nov 16, 2017 at 19:43

1 Answer 1

0
\$\begingroup\$

A solution for my problem is using this two methods OnMouseEnter() and OnMouseExit.

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.