If you select a cell and any non-neighbour cell, the selection will be remembered. This will lead to a bug where selecting another tile instead of the first selected one will not be possible to pop on the entire map. FIX to add Clear selection method: if (Array.IndexOf(_selection[0].Neighbours, tile) != -1) { _selection.Add(tile); } else { _selection.Clear(); }
Thank you very much. I was developing a game in the style of Bubble Shooter, and my method for recursively detecting neighbors was consistently causing a stack overflow error. Your approach to this matter is incredibly concise and straightforward. You've saved me from a significant waste of time; words can't express how thankful I am. 👏❤
When I follow along on this video & make it from scratch, I get all sorts of compiler errors. I am using the same Unity version as you. And when I compare the code from the updated project that you have a link to, I find that the code is totally different. For instance in the code in the video you reference _selection, but it is NOT defined anywhere in the code, so it gives me all sorts of errors. So now I am stuck at around 36:00 in the video because I can't get it to work correctly.
I may be 2 years late but in case anyone runs into the same issue, check if the variables on the scripts in your prefabs are assigned! I ran into the same issue and noticed I had just forgotten to assign the Icon and Button on the Tile prefab, it is shown at around 29:38 if you want to see what I mean 😅 I hope this helps!
I want to stack tiles from top to bottom after matching instead of replacing blank tiles with random tiles, would organizing the tiles into columns instead of rows make that easier?
Yo man. Thanks for the tutor. Would be awesome if future videos get a little bit louder. I mean in headphones is ok, but phone loudspeakers are interrupted by outside noises(in my case it's car noises from window).
I'm really grateful for your feedback! I'm going to buying a dedicated microphone as soon as I can since I already know that my headset one is quite bad.
Thanks for the tutorial, easy to follow. 1. Is there anyway to make the connected tiles match and pop only for horizontal or vertical tiles only of 3 or more? 2. How do we determine when it's game over?
At 15:00 When I finished the script for item and go back to Unity, I got an error says Assets\Script\Item.cs(3,19): error CS0246: The type or namespace name 'menuName' could not be found (are you missing a using directive or an assembly reference?) any help for that
I was having the exact same issues but what I figured out is that I had added a letter to CreateAssetMenu. I had it as CreatedAssetMenu. Adding that d, though it looks pretty correct, messes with it.
When will there be an updated video tut of this? And can you show more of how to add score, timer, your own background image & have an ending to go to the next level? Thanks.
I'm currently busy with school. When I get some free time I will release an updated video tutorial that shows how to create a match 3 game in a much more easy and more performant way. Stay tuned!
I got a error saying Severity Code Description Project File Line Suppression State Error CS1061 'row[]' does not contain a definition for 'Max' and no accessible extension method 'Max' accepting a first argument of type 'row[]' could be found (are you missing a using directive or an assembly reference?) Assembly-CSharp C:\Users\m\Documents\Unity\ofiical pw\Assets\scripts\board.cs 20 Active I'm at 20:34 part of the video
when trying to click change it fast Until the image icon is stuck together and then comes up with a message that says "ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection." How should I fix it?
Great video. There is a small bug where it stops matching tiles that are already looped over in the Pop() method. I added this at the end of the Pop() method. if (CanPop()) { await Pop(); }
I should've mentioned this but the code in this tutorial is free for anyone to use in their projects with no attribution required (but is appreciated).
I'm trying to follow your tutorial and I'm stuck at the 30th minute. I've tried to download the project but the page is blocked. Would you be so kind as to fix it?
Hello, thank you for the great tutorial :) I have a question, what does this code mean? public Tile[ ] Neighbours => new [ ] { Left, Top, Right, Bottom, }; I didn't see that syntax before, it looks like you create a new property that has just a "get" and you just wrote"new [ ]" without specifying what type of array you creating and filled it with all the directions you created?
In recent C# versions, you don't need to specify the type of the array if it is already known at compile time. What I did above is that I created a "computed property" which basically means a property with a getter only that can't be initialized anywhere even in the constructor though the property will be computed automatically every time you reference it. The property above simply holds all the neighboring tiles to make certain operations more convenient.
hi bro. gives me this error. how can I solve it? NullReferenceException: Object reference not set to an instance of an object Board.Start () (at Assets/Scripts/Board.cs:33) script line 33 : tile.Item = ItemDatabase.Items[Random.Range(0, ItemDatabase.Items.Length)];
change your ItemDatabase script with -> using UnityEngine; public class Itemdatabase { public static Item[] items { get; private set; } [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] private static void Initialize() { // Ensure the array gets populated items = Resources.LoadAll("Items/"); if (items == null || items.Length == 0) { Debug.LogError("No items found in the 'Resources/Items' folder."); } } }
This actually is not a very performant way of handling a match game. Especially when the typical board is 7x7 or larger. Iterating through every single tile, and then recursively looking through connected tiles for matches takes too much time. A check is needed to prevent tiles that have already been checked (through recursion) from going back in the direction from which they were already checked. For example, a tile at position 3, 2 does not need to check any tiles whose x is less than 3 or whose y is less than 2. Also, you're deflating after every single tile you check. Instead, you should wait until you've checked the entire board to do the deflation. In the current implementation it's repeating the deflating task because (as I mentioned before), it's also checking tiles that have already been checked...and since even though they've been deflated, their tile value is still the same, they're added to the task all over again.
Thanks a lot for your comment. This tutorial was intended to help people understand how a "basic" match-three game is created. I agree that the method used to do the matching is inefficient. I've come up with a much better solution since publishing this video, and I intend to do a video when I've time. Again, thanks a lot for your comment 💖 it is rare to see someone criticising you and giving you helpful advice these days.
After a year and a half away from game dev my friend from university and I figured we would try a matching game to get back into the swing of things. Working entirely from scratch we almost had it done. Out of curiosity as I lay here before bed I wanted to see how others went about it and my theory (including the paint drawing 😂) is bang on the money with how you have done it (save for setting up the grid). I’ve used lists before but haven’t set up a grid system but I didn’t want to go down that path if I could avoid it. Looks like I’ve still got it 😂 great vid
Getting a fault IndexOutOfRangeException: Index was outside the bounds of the array. MatchThreeEngine.Board.Start () (at Assets/Scripts/MatchThreeEngine/Board.cs:65 Any ideas?
The board can be of any dimensions. You *don't* need a square board. You can have a spiral board and everything will work just fine if you follow the tutorial carefully.
@@winterboltgames Then I will have to rewatch it very carefuly! Thanks for the awesome video and the fast response. You rock sir! EDIT: Found the error. I had a mess with the tile neighbours (which error, ironically, did not manifested in square matrix)
it seems to be ok in the scorecounter script but in the board script when i write this ScoreCounter.Instance.Score += tile.Item.value * connectedTiles.Count; it has an error that the name tile does not exist in the current content
So for my next new project I'm going to make a multiplayer dungeon battler where each player will try and solve these matches to launch attacks at monsters. Yay fnet! :)
@@winterboltgames Just got through it now, followed the video and up until the last bit I was like "but I can move tiles from anywhere!" But I figured I could put a check for the neighbours in the selection method anyway xD so was happy to see the updated video. But I have a bug. If you click again while the tiles are moving, you select a third tile and the two moving tiles stop halfway and remain bugged in that position even if they pop. I think I have to put in a check or bool somewhere to prevent selecting while the game is actively moving
someone has did it but with the match 3 on a line instead of in any direction? i mean 3 horizontals or 3 verticals intead of 2 verticals and 1 horizontal, for example
Thank you so much for the video and clear explanations you explained some of the more complex parts really detailed and easy to follow. You suggested making on shuffle algorithm on start to make sure there is no matching tiles to begin with, how would I go about doing that? Thank you again for taking the time to this tutorial I don't know whether you will see this or not but thank you regardless.
@@winterboltgames Awesome cant wait! However would you mind pointing me in the right direction regarding that, I could use that small quality of life addition. Thank you again. :)
I've tried to in the loop to populate the board inside the Start method to maybe check for Neighbours but cant figure out the syntax, is there a way to stop the score from accumulating while using the Pop() at the start - I think i'll try to use that as an alternative Edit: So sorry to be annoying but shouldn't this work snipboard.io/x7yXcR.jpg :/ - Edit again nevermind figured something out
Finally finished the tutorial Great learning experience for me Love the video But I encouraged a 2 bugs if you swipe while an item is still swiping the game crashes And also when you select an object and select another object far off then select two other objects that a close to each other it doesn't swipe...it still wants to swipe with the first object you selected Also can you do a tutorial on powered up items... like matching 4 will give another item etc and stuff like matching items in a straight line? ♥️sub
Hello please help me. In this time: 31:24 , when I want to click on sprite or tile in game mode , I have no tile selection or reaction . Do you know how can I do it ? After onclick code I have this problem too.
i wrote exactly what you wrote but i encountered 2-3 errors. No animal images appear in the upper left corner and i get an error when i press it. Pressing the A key grows all boxes that are not matched. When i type the code exactly, the matching boxes do not disappear.
ndexOutOfRangeException: Index was outside the bounds of the array. MatchThreeEngine.Board.Start () (at Assets/Assets/Scripts/MatchThreeEngine/Board.cs:65) ???
I am stuck at this error, rewatched the video multiple times, but I cant seem to solve it, please help: IndexOutOfRangeException: Index was outside the bounds of the array. MatchThreeEngine.Tile.get_Bottom () (at Assets/Scripts/Tile.cs:31) MatchThreeEngine.Tile.get_Neighbours () (at Assets/Scripts/Tile.cs:32) MatchThreeEngine.Tile.GetConnectedTiles (System.Collections.Generic.List`1[T] exclude) (at Assets/Scripts/Tile.cs:46) MatchThreeEngine.Tile.GetConnectedTiles (System.Collections.Generic.List`1[T] exclude) (at Assets/Scripts/Tile.cs:49) Board+d__20.MoveNext () (at Assets/Scripts/Board.cs:111) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at :0) System.Runtime.CompilerServices.AsyncMethodBuilderCore+c.b__6_0 (System.Object state) (at :0) UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at :0) UnityEngine.UnitySynchronizationContext:ExecuteTasks()
The link to the complete project has been updated.
drive.google.com/file/d/1poHbfokB1QACOb3_X-V2nZw0nIL4RKNl/view?usp=sharing
If you select a cell and any non-neighbour cell, the selection will be remembered. This will lead to a bug where selecting another tile instead of the first selected one will not be possible to pop on the entire map.
FIX to add Clear selection method:
if (Array.IndexOf(_selection[0].Neighbours, tile) != -1)
{
_selection.Add(tile);
}
else
{
_selection.Clear();
}
Thank you very much. I was developing a game in the style of Bubble Shooter, and my method for recursively detecting neighbors was consistently causing a stack overflow error. Your approach to this matter is incredibly concise and straightforward. You've saved me from a significant waste of time; words can't express how thankful I am. 👏❤
I love that you use advanced C# and Unity methods. I find learning through examples to be really effective for me.
Yep! learning things by actually doing them is the best way to learn!
A clear, easy to understand, helpful tutorial. Thank you
A very insightful tutorial for beginners. Thank you
This was very helpful! Thank you for a great tutorial!
You're very welcome!
When I follow along on this video & make it from scratch, I get all sorts of compiler errors. I am using the same Unity version as you. And when I compare the code from the updated project that you have a link to, I find that the code is totally different. For instance in the code in the video you reference _selection, but it is NOT defined anywhere in the code, so it gives me all sorts of errors. So now I am stuck at around 36:00 in the video because I can't get it to work correctly.
if you're still stuck on this, you can define it as a List and set it as private
I may be 2 years late but in case anyone runs into the same issue, check if the variables on the scripts in your prefabs are assigned! I ran into the same issue and noticed I had just forgotten to assign the Icon and Button on the Tile prefab, it is shown at around 29:38 if you want to see what I mean 😅
I hope this helps!
Legend 🔥 thanks for helping the community 🙏🏻
GREAT VID!! (it took me 2 tries but eventually it worked!)
Great tutorial, this was really useful!
Glad it was helpful!
I want to stack tiles from top to bottom after matching instead of replacing blank tiles with random tiles, would organizing the tiles into columns instead of rows make that easier?
It could, yes. But it would affect how you do other things as well, so keep that in mind.
Yo man. Thanks for the tutor. Would be awesome if future videos get a little bit louder. I mean in headphones is ok, but phone loudspeakers are interrupted by outside noises(in my case it's car noises from window).
I'm really grateful for your feedback! I'm going to buying a dedicated microphone as soon as I can since I already know that my headset one is quite bad.
Thanks for the tutorial, easy to follow.
1. Is there anyway to make the connected tiles match and pop only for horizontal or vertical tiles only of 3 or more?
2. How do we determine when it's game over?
At 15:00
When I finished the script for item and go back to Unity, I got an error says
Assets\Script\Item.cs(3,19): error CS0246: The type or namespace name 'menuName' could not be found (are you missing a using directive or an assembly reference?)
any help for that
I was having the exact same issues but what I figured out is that I had added a letter to CreateAssetMenu. I had it as CreatedAssetMenu. Adding that d, though it looks pretty correct, messes with it.
great tutorial, well done.
Do you have plan to make video about custom grid ? not just rectangle.
Thanks for your comment. Will see what I can do 😉
Do the gameobjects - tiles specifically, stretch when you test the game on a real device with different resolution? how to adapt to all screen sizes?
If you've adjusted the canvas as shown in the video then they shouldn't.
Thanks for answering. Actually after watching more I see that it is a different approach than what I tried, I'll test it, much appreciated.
When will there be an updated video tut of this? And can you show more of how to add score, timer, your own background image & have an ending to go to the next level? Thanks.
I'm currently busy with school. When I get some free time I will release an updated video tutorial that shows how to create a match 3 game in a much more easy and more performant way. Stay tuned!
@@winterboltgames Thanks
hey how to make a scoreboard with the new project?
I want to know as well
Awesome tutorial, thank you so much
You're welcome ❤️
I got a error saying
Severity Code Description Project File Line Suppression State
Error CS1061 'row[]' does not contain a definition for 'Max' and no accessible extension method 'Max' accepting a first argument of type 'row[]' could be found (are you missing a using directive or an assembly reference?) Assembly-CSharp C:\Users\m\Documents\Unity\ofiical pw\Assets\scripts\board.cs 20 Active
I'm at 20:34 part of the video
Your probably forget to add "using System.Linq" to the top of the file giving you the error.
🔥🔥🔥🔥🔥🔥🔥 Very we’ll explain!
when trying to click change it fast Until the image icon is stuck together and then comes up with a message that says "ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection." How should I fix it?
Great video. There is a small bug where it stops matching tiles that are already looped over in the Pop() method. I added this at the end of the Pop() method.
if (CanPop())
{
await Pop();
}
Hello, please tell me how to implement point(score) counting in the latest version of the game from 06/01/2021, thanks in advance.
how are your using directives automatically generated
www.jetbrains.com/help/rider/Settings_Auto_Import.html
Oh i thought you were using vscode
Is there a copyright on your codes and can they be used for a creation of my own project?
I should've mentioned this but the code in this tutorial is free for anyone to use in their projects with no attribution required (but is appreciated).
@@winterboltgames Thats good to hear. Thanks for the quick answer 🥰
I'm trying to follow your tutorial and I'm stuck at the 30th minute. I've tried to download the project but the page is blocked. Would you be so kind as to fix it?
Have you tried this link → drive.google.com/file/d/1poHbfokB1QACOb3_X-V2nZw0nIL4RKNl/view?usp=sharing
@@winterboltgames Thank you very much for your reply. The problem was with my browser. Sorry ^_^
@@UnCurieux you're welcome 😊
How can I check if it's impossible to do a move and if so reset the board?
Iterate over the entire board and try switching tiles and if no matches are caused by that simply shuffle the board the repeat
tysm for tutorial this is so helpful!! =D
Hello, thank you for the great tutorial :)
I have a question, what does this code mean?
public Tile[ ] Neighbours => new [ ]
{
Left,
Top,
Right,
Bottom,
};
I didn't see that syntax before, it looks like you create a new property that has just a "get" and you just wrote"new [ ]" without specifying what type of array you creating and filled it with all the directions you created?
In recent C# versions, you don't need to specify the type of the array if it is already known at compile time. What I did above is that I created a "computed property" which basically means a property with a getter only that can't be initialized anywhere even in the constructor though the property will be computed automatically every time you reference it. The property above simply holds all the neighboring tiles to make certain operations more convenient.
@@winterboltgames Thank you very much for your answer :)
@@0darkwings0 You're welcome 😉
Thanks a lot! Helped make a cool game🎉🎉🎉
hi bro. gives me this error. how can I solve it?
NullReferenceException: Object reference not set to an instance of an object
Board.Start () (at Assets/Scripts/Board.cs:33)
script line 33 : tile.Item = ItemDatabase.Items[Random.Range(0, ItemDatabase.Items.Length)];
I have this problem too-ItemDatabase dont found on chooselist and dont understand what is it. I think its one of component DOTweens or something
change your ItemDatabase script with ->
using UnityEngine;
public class Itemdatabase
{
public static Item[] items { get; private set; }
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
private static void Initialize()
{
// Ensure the array gets populated
items = Resources.LoadAll("Items/");
if (items == null || items.Length == 0)
{
Debug.LogError("No items found in the 'Resources/Items' folder.");
}
}
}
Hello How i can add other tile-types ? it's not work when i add it using this [CreateAssetMenu(menuName = "Match 3 Engine/Tile Type Asset")]
Many thanks for the help 🌹
This actually is not a very performant way of handling a match game. Especially when the typical board is 7x7 or larger. Iterating through every single tile, and then recursively looking through connected tiles for matches takes too much time. A check is needed to prevent tiles that have already been checked (through recursion) from going back in the direction from which they were already checked. For example, a tile at position 3, 2 does not need to check any tiles whose x is less than 3 or whose y is less than 2.
Also, you're deflating after every single tile you check. Instead, you should wait until you've checked the entire board to do the deflation. In the current implementation it's repeating the deflating task because (as I mentioned before), it's also checking tiles that have already been checked...and since even though they've been deflated, their tile value is still the same, they're added to the task all over again.
Thanks a lot for your comment. This tutorial was intended to help people understand how a "basic" match-three game is created. I agree that the method used to do the matching is inefficient. I've come up with a much better solution since publishing this video, and I intend to do a video when I've time.
Again, thanks a lot for your comment 💖 it is rare to see someone criticising you and giving you helpful advice these days.
@@winterboltgames looking forward to seeing it!
After a year and a half away from game dev my friend from university and I figured we would try a matching game to get back into the swing of things. Working entirely from scratch we almost had it done. Out of curiosity as I lay here before bed I wanted to see how others went about it and my theory (including the paint drawing 😂) is bang on the money with how you have done it (save for setting up the grid). I’ve used lists before but haven’t set up a grid system but I didn’t want to go down that path if I could avoid it.
Looks like I’ve still got it 😂 great vid
thank you, this is a very cool video
Getting a fault
IndexOutOfRangeException: Index was outside the bounds of the array.
MatchThreeEngine.Board.Start () (at Assets/Scripts/MatchThreeEngine/Board.cs:65
Any ideas?
found it, damn it! Make sure your Resource folder named "Resources" not "Resourses"
Is your board nxn ? I had that error when I created a 5X7 board, I think they must be the same rows and columns in order to work
The board can be of any dimensions. You *don't* need a square board. You can have a spiral board and everything will work just fine if you follow the tutorial carefully.
@@winterboltgames Then I will have to rewatch it very carefuly! Thanks for the awesome video and the fast response. You rock sir!
EDIT: Found the error. I had a mess with the tile neighbours (which error, ironically, did not manifested in square matrix)
@@navelak 🙂
is the link to the complete project still available
I did follow every single step until 31:09 but my Sprites are yet not shown. Any ideas? Who can help me!
Quickly scrub through the video and take multiple looks at the code to make sure that you did follow everything correctly.
Iam also having same problem 🥲
@@winterboltgames but code also correct but animals image are yet not shown
Are the sprites behind the background layer?
Same pretty much but I'm getting this message
IndexOutOfRangeException: Index was outside the bounds of the array.
How to copy paste auto increase (tile_1, tile_2...)
Project Settings > Editor > Numbering Scheme
@@etrigan966 Thank u !!!
The script for the score seems to not working. Any ideas please??
What is not working exactly? I suggest that you scrub through the video quickly and see if you missed or done anything incorrectly.
@@winterboltgames in the scorecounter script some errors apout TextMeshproUGUI and for serializeField
@@vasosvasileiadis7978 You need to have both of TextMeshPro and UnityEngine namespaces in order for the errors to go away.
it seems to be ok in the scorecounter script but in the board script when i write this
ScoreCounter.Instance.Score += tile.Item.value * connectedTiles.Count;
it has an error that the name tile does not exist in the current content
@@vasosvasileiadis7978 You probably missed a variable declaration. Please, re-watch the part of the video where this is implemented again.
Great video, Is there a way to have different effects when certain blocks match? like if you match some red blocks you get more points or something
Thanks for your comment. You can the match animation function so it also creates a particle system or does whatever you want.
So for my next new project I'm going to make a multiplayer dungeon battler where each player will try and solve these matches to launch attacks at monsters. Yay fnet! :)
Good luck!!
@@winterboltgames Just got through it now, followed the video and up until the last bit I was like "but I can move tiles from anywhere!" But I figured I could put a check for the neighbours in the selection method anyway xD so was happy to see the updated video. But I have a bug. If you click again while the tiles are moving, you select a third tile and the two moving tiles stop halfway and remain bugged in that position even if they pop. I think I have to put in a check or bool somewhere to prevent selecting while the game is actively moving
@@wiglord I'll release a much better tutorial soon (once I get a new mic 😂) that will solve all of the old problems and allow for more features.
someone has did it but with the match 3 on a line instead of in any direction? i mean 3 horizontals or 3 verticals intead of 2 verticals and 1 horizontal, for example
You need to tweak the code yourself to suite your use case but yes, it is doable.
Thank you so much for the video and clear explanations you explained some of the more complex parts really detailed and easy to follow.
You suggested making on shuffle algorithm on start to make sure there is no matching tiles to begin with, how would I go about doing that?
Thank you again for taking the time to this tutorial I don't know whether you will see this or not but thank you regardless.
I'm going to be releasing a new and improved tutorial soon. Stay tuned 😉
@@winterboltgames Awesome cant wait! However would you mind pointing me in the right direction regarding that, I could use that small quality of life addition. Thank you again. :)
I've tried to in the loop to populate the board inside the Start method to maybe check for Neighbours but cant figure out the syntax, is there a way to stop the score from accumulating while using the Pop() at the start - I think i'll try to use that as an alternative
Edit: So sorry to be annoying but shouldn't this work snipboard.io/x7yXcR.jpg :/ - Edit again nevermind figured something out
Finally finished the tutorial
Great learning experience for me
Love the video
But I encouraged a 2 bugs
if you swipe while an item is still swiping the game crashes
And also when you select an object and select another object far off then select two other objects that a close to each other it doesn't swipe...it still wants to swipe with the first object you selected
Also can you do a tutorial on powered up items... like matching 4 will give another item etc and stuff like matching items in a straight line?
♥️sub
Hello please help me. In this time: 31:24 , when I want to click on sprite or tile in game mode , I have no tile selection or reaction . Do you know how can I do it ? After onclick code I have this problem too.
i wrote exactly what you wrote but i encountered 2-3 errors. No animal images appear in the upper left corner and i get an error when i press it. Pressing the A key grows all boxes that are not matched. When i type the code exactly, the matching boxes do not disappear.
link of complete proj doesnt work
Oh, something must have gone wrong then. I'll re-upload and let you know later today. Thanks for bringing this up!
@@winterboltgames Hello, still not working?
Sorry. I'm going to post it right away. Just give an hour.
@@winterboltgames Thanks and please do quickly
@@MuhammadShahid-co8yt drive.google.com/file/d/1poHbfokB1QACOb3_X-V2nZw0nIL4RKNl/view?usp=sharing
System.Linq doesn't have the rows.max
Max is an *extension method*. You simply need to import System.Linq and it will become available.
@@winterboltgames but I did import the
Using System.Linq
@@winterboltgames oh I'm really sorry
Just had to update my Visual studio
Everything is working fine now
Bro but your Video Resolution is not Available
感恩
any easy way to make this for mobile?
Simply build your app for Android/iOS and everything should work.
ndexOutOfRangeException: Index was outside the bounds of the array.
MatchThreeEngine.Board.Start () (at Assets/Assets/Scripts/MatchThreeEngine/Board.cs:65) ???
Sometimes items don't Pop when they are matched
I am stuck at this error, rewatched the video multiple times, but I cant seem to solve it, please help:
IndexOutOfRangeException: Index was outside the bounds of the array.
MatchThreeEngine.Tile.get_Bottom () (at Assets/Scripts/Tile.cs:31)
MatchThreeEngine.Tile.get_Neighbours () (at Assets/Scripts/Tile.cs:32)
MatchThreeEngine.Tile.GetConnectedTiles (System.Collections.Generic.List`1[T] exclude) (at Assets/Scripts/Tile.cs:46)
MatchThreeEngine.Tile.GetConnectedTiles (System.Collections.Generic.List`1[T] exclude) (at Assets/Scripts/Tile.cs:49)
Board+d__20.MoveNext () (at Assets/Scripts/Board.cs:111)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at :0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+c.b__6_0 (System.Object state) (at :0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at :0)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()
🔥🔥🔥🔥🔥🔥🔥 Very we’ll explain!