![Day 13 of Game Dev: Communication in between scripts using GetComponent()! | by Ethan Martin | Dev Genius Day 13 of Game Dev: Communication in between scripts using GetComponent()! | by Ethan Martin | Dev Genius](https://cdn-images-1.medium.com/fit/t/1600/480/1*I4wLabX2scGrEUvzlIsHmg.gif)
Day 13 of Game Dev: Communication in between scripts using GetComponent()! | by Ethan Martin | Dev Genius
![Unity Tip: Use TryGetComponent instead of GetComponent to avoid memory allocation in the Editor | by Jiadong Chen | The Programmer In Kiwiland | Medium Unity Tip: Use TryGetComponent instead of GetComponent to avoid memory allocation in the Editor | by Jiadong Chen | The Programmer In Kiwiland | Medium](https://miro.medium.com/v2/resize:fit:1400/1*akNpDcopkvGHCErXYuCuEw.png)
Unity Tip: Use TryGetComponent instead of GetComponent to avoid memory allocation in the Editor | by Jiadong Chen | The Programmer In Kiwiland | Medium
![Can't find script in GameObject with GetComponent ("The type or namespace name could not be found") - Unity Forum Can't find script in GameObject with GetComponent ("The type or namespace name could not be found") - Unity Forum](https://forum.unity.com/proxy.php?image=https%3A%2F%2Fwww.dropbox.com%2Fs%2Fpwx1zw7u7agrj70%2F2.png%3Fdl%3D1&hash=31f240ef21bb602b4f2755812f7d246c)
Can't find script in GameObject with GetComponent ("The type or namespace name could not be found") - Unity Forum
![visual studio - in OnTriggerEnter2D collision.getComponents() throws exception, unity - Stack Overflow visual studio - in OnTriggerEnter2D collision.getComponents() throws exception, unity - Stack Overflow](https://i.stack.imgur.com/tMHr0.png)
visual studio - in OnTriggerEnter2D collision.getComponents() throws exception, unity - Stack Overflow
![GetComponent() failing for enemy colliders from OverlapSphereNonAlloc array, but working fine from Raycast output - Unity Answers GetComponent() failing for enemy colliders from OverlapSphereNonAlloc array, but working fine from Raycast output - Unity Answers](https://answers.unity.com/storage/temp/173956-shoot-collider-enemyhealth.png)
GetComponent() failing for enemy colliders from OverlapSphereNonAlloc array, but working fine from Raycast output - Unity Answers
![Unity Tip: Use TryGetComponent instead of GetComponent to avoid memory allocation in the Editor | by Jiadong Chen | The Programmer In Kiwiland | Medium Unity Tip: Use TryGetComponent instead of GetComponent to avoid memory allocation in the Editor | by Jiadong Chen | The Programmer In Kiwiland | Medium](https://miro.medium.com/v2/resize:fit:1400/1*DWtciDXQvI8EDeszxmSa8w.png)