[Unity Tip] Use TryGetComponent(0 to avoid null Reference Exception (Patreon)
Published:
2023-08-08 07:54:20
Imported:
2026-06
haven't archived this post yet. have a subscription? use the importer!
Downloads
Missing 1 file, as this post has not yet been imported.
Content
To avoid getting a Null Reference Exception in Unity, use TryGetComponent() instead of GetComponent() when working with components🙂👍
#unitytips #gamedev #unity2d #IndieGameDev #Coding