Problems with hit.collider

I used to work with hit.collider all the time back with unity 4.6 but now it always says that the name hit doesn’t exist in the current context- if (hit.collider.tag == "SomeTag") { Debug.Log("Something"); } it tells me that that the name “hit” doesn’t exist in the current context.

Errr… “hit” in that context is just the name of an instance variable that you control. Without more posted code, I have no idea what you called it instead of “hit”, but it should be defined by you in your code…