Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

question about C#

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

Best Answer

  • MouledouxMouledoux Member
    Accepted Answer

    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.

Sign In or Register to comment.