This is a story of NullReferenceException part 2. If you haven’t read the part one, you can still do it here. Don’t trust GetComponent() GetComponent() is a commonly used function to access current GameObject’s component. Here’s a code snippet showing how to disable object’s renderer, so it is no longer visible in the game view. var renderer = […]
A Story of NullReferenceException [Part 2]
