Complete the code to get the Rigidbody component attached to the GameObject.
Rigidbody rb = gameObject.[1]<Rigidbody>();The GetComponent method retrieves a component of the specified type attached to the GameObject.
Complete the code to get the AudioSource component from the current GameObject.
AudioSource audio = [1].GetComponent<AudioSource>();gameObject refers to the current GameObject, from which we get the AudioSource component.
Fix the error in the code to correctly get the Collider component.
Collider col = gameObject.[1]<Collider>();The method GetComponent must be called with the type inside angle brackets and parentheses after it. The blank is for the method name only, so GetComponent is correct here.
Fill both blanks to get the SpriteRenderer component from the child GameObject.
SpriteRenderer sr = transform.[1](0).gameObject.[2]<SpriteRenderer>();
GetChild(0) gets the first child Transform, then GetComponent<SpriteRenderer>() gets the SpriteRenderer component from that child GameObject.
Fill all three blanks to get the Light component from the parent GameObject's first child.
Light lightComp = transform.[1]().[2](0).gameObject.[3]<Light>();
GetParent() gets the parent Transform, GetChild(0) gets its first child, and GetComponent<Light>() gets the Light component from that child's GameObject.