Hi there!
If you do not use the template project provided youâll need to make sure âQueries Start in Collidersâ is checked off in your Physics2D settings (Edit >> Project Settings >> Physics 2D) and that should fix your raycast issue!
Hi there!
If you do not use the template project provided youâll need to make sure âQueries Start in Collidersâ is checked off in your Physics2D settings (Edit >> Project Settings >> Physics 2D) and that should fix your raycast issue!
I have a better solution that seems to work so far â shift the tiles up if the top row is clicked on, down for the other rows.
Hi, Iâve been following this tutorial but Iâve hit a snag and canât seem to figure it out.
In the section titled âFinding Adjacent Tilesâ it says to replace a few lines in the OnMouseDown method with an if and then an else statement.
Upon testing the project however, OnMouseDown only seems to return results for the else statement, not the if statement.
Clicking a tile in the âGameâ window deselects the previously selected tile, selects the clicked on tile and does not swap them.
Is there something Iâm missing here?
Hopefully you can help me solve this problem
Thanks
Sorted this, I was using a BoxCollider, rather than a 2DBoxCollider
Hi i struggled at the same and found a solution i think work at least it worked in my test
insert this in ShiftTilesDown method:
if(renders.Count == 1)
{
renders[0].sprite = GetNewSprite(x, ySize - 1);
}
just before this code:
for (int k = 0; k < renders.Count - 1; k++)
{
renders[k].sprite = renders[k+1].sprite;
renders[k + 1].sprite = GetNewSprite(x, ySize - 1);
}
Great tutorial. Thanks so much. I tried to build for mobile and ran into a problem I donât understand. The entire screen was stretched to fit the screen, so the square sprites were tall rectangles. Do you have any suggestions on what settings I should check?
Thanks!
Hey, thanks for the great tutorial. I am coming across one issue that I am not sure has been brought up yet. When I move a tile to an adjacent space that does not have a match, the tile will move instead of going back to its original space. I would like to have it that if moving a tile doesnât match a match, the tile trying to be moved is returned to its original space and no turn is used. Can anyone help with that?
This tutorial is more than six months old so questions regarding it are no longer supported for the moment. We will update it as soon as possible. Thank you! :]