Tag Info

New answers tagged

2

That's not using GetComponent() on the class GameObject, it's using GetComponent() on the result of GameObject.Find() GameObject.Find() is a static function, but it returns a specific object. Note that Code 2 is also using GameObject.Find() but then you store the result object in a variable. Code 1 uses the exact same functions but doesn't store the result ...



Top 50 recent answers are included