
It looks like you're new here. If you want to get involved, click one of these buttons!
what is the difference between FindObjectOfType and GetComponent?? sometimes if i swap them around there is no differences but when it comes to EndGame function it wont work
GetComponent only returns components on the same gameObject.
FinObjectOfType just returns the first one it finds in the scene. Which may not always be the same one.
Answers
GetComponent only returns components on the same gameObject.
FinObjectOfType just returns the first one it finds in the scene. Which may not always be the same one.