Concept Flow - GetComponent usage
Start
Call GetComponent<T>()
Search GameObject for component of type T
Found?
No→Return null
Yes
Return component reference
Use component reference in code
End
The program calls GetComponent to find a component of type T on the same GameObject. If found, it returns it; otherwise, it returns null.