So I was experimenting with the code to see if I really understood what I was seeing and I bumped into something I’m really curious about. I was wondering if there is a good explanation for why this is…
I set my cache references to:
MeshRenderer render;
Rigidbody rigid;
When I was typing out the GetComponent section I thought to myself:
“I should be able to put this outside of Start() because it’s just a simple declaration that (x name) = (y command), right?”
…but the names render and rigid appear white instead or blue and had to be put in Start() for them to work. Why is that?