Why FindObjectOfType PlayerMovement, part 2

Continuing the discussion from Why FindObjectOfType PlayerMovement , not NameOfThePlayer or similar:

Why can’t we have a more direct reference to Ginger (the player object with the many components attached)? It seems like an indirect route to look for a Unique Component (which is a component of our Player), and check its Transform becasue Transform = player transform.

Like what would we do if there wasn’t a unique component on Ginger, for us to FindObjectOfType with?

Thanks!

A post was merged into an existing topic: Why FindObjectOfType PlayerMovement , not NameOfThePlayer or similar

Privacy & Terms