Are you sure it’s not stuck in the while loop in MoveOnPath()? Does it need to be turned into a co-routine with a yield return null statement inside the while loop so everything else can run?
Currently your MoveOnPath function attempts to change the transform position multiple times within a single update. This means whatever is set last in the function will be rendered to the screen, rather than any movement from the multiple changes the function makes. So maybe putting
while(moving && currentPathG > nextPathG)
{
/* code to move transform */
yield return null;
}
and turning the function into a co-routine might solve your issue.
Regardless it definitely looks like currently your while loop is never meeting the conditions to exit the loop, freezing your game.
P.S
Next time you post code check this post out before you do so