Is there any difference between using gameObject and GameObject in code? I read somewhere that you should not use capitals as first letters but have seen both used as script examples.
You use GameObject to declare a new variable.
GameObject someObject;
You use gameObject to access some specific gameobject, all its scripts, tags, colliders, everything.
hit.collider.gameObject.tag...