Check out example codes for "how to see a tag of what you hit with raycast". It will help you in understanding the concepts better.

Code Example 1

if (Physics.Raycast (transform.position, fwd, hit, Reach) && hit.transform.tag == "TagName") {

Learn ReactJs, React Native from akashmittal.com