Everything appears correct, are you sure the issue is in that code? If you comment that out it no longer happens?
Does it crash your entire computer? Not just Unity?
How big is your grid? If it’s insanely big you might be running out of memory.
Are you somehow modifying the grid height?
Check the crash logs to see what they say Code Monkey - Unity Tip: Unity Crashed! Why?
This code is in GridSystemVisualSingle which it shouldn’t be. You are running this over and over and over again because you instantiate another GridSystemVisualSingle which runs it again, doing the same thing. Unity crashes because you are creating a gazillion GridSystemVisualSingle objects
Oh right good catch I didn’t notice that, yea that script is running on every Single object which in turn creates more objects which in turn run that script and create more and so on