my game just... stops

context:
I am making a tabletop game that creates a board randomly

my problem:
I’m trying to make the pieces light up when hovering over them (I have already achieved it). but the problem is that at some point the game just freezes and the light-up of the pieces stops working.

my theory is that after generating the board in front of you it doesn’t have anything else to load (I still haven’t use Upload recursively) it just stops loading anything.
¿is that a thing or it may be another thing?

it does not show any error or crash, just stops.

Hi @jgchapoy ,

My recommendation is:

  • Add some Debug.Log messages (before and after) in the location of your game code where it’s supposed to be triggering the “light-up of your pieces” that currently at some point are not working anymore;

  • Play your game in the Editor until you reproduce your issue again;

  • Add a breakpoint in the last location in your code that is currently working (the message in the console window is still printed out);

  • Continue playing to have your flow stopped on the breakpoint that you just added;

  • Analise in your IDE the value of your variables to see if there is something wrong;

  • If can’t find anything wrong, then continue the execution of your game step by step to find the exact situation in where is not working as expected;

  • Change your code, your assets, or your components accordingly to fix your current bug.

I hope this helps.

Good luck with it!

thank you very much. I tested and made some modifications and found the problem. “OnMouse exit”. turns out that while I do a drag and drop at some point the “OnMouseExit” triggers while I’m still dragging, so I haven´t left the collision box. Any ideas what could cause it or how I can detect what it causes it?

My pleasure!

Maybe you can try to disable your “OnMouse” events while the dragging operation is ongoing?