How do I detect the object name instead of tag?
As in this case:
if (hit.gameObject.tag == “Player”) {/ / here looking for the tag, not the object name
It would be like this:
if (hit.gameObject == “Player”) {
How do I detect the object name instead of tag?
As in this case:
if (hit.gameObject.tag == “Player”) {/ / here looking for the tag, not the object name
It would be like this:
if (hit.gameObject == “Player”) {
hit.gameObject.name == “Player”
Allright, thanks!