Object References in Unity - How to Communicate Between Scripts @Tarodev
Object References in Unity - How to Communicate Between Scripts  @Tarodev
Uploaded January 2022 | Updated September 2026, 2 weeks ago
PSA: The "Unit" class is a simple class I created to represent a unit in my game. It's NOT an inbuilt class. Sorry for the confusion.

As a new dev, keeping references to game objects you need can be a little confusing. Learn how to store game objects for later use as well as allowing external scripts access to your goodies.

Instead of trying to find an object, shift your thought pattern a little and ask "should I already know where this object is?".

❤️ Become a Tarobro on Patreon: patreon.com/tarodev

=========

🔔 SUBSCRIBE: bit.ly/3eqG1Z6
🗨️ DISCORD: discord.gg/tarodev
✅ MORE TUTORIALS: youtube.com/tarodev


0:50 - Find Methods
1:45 - GameObject from Instantiate
2:33 - Component from Instantiate
3:49 - Multiple Components
4:59 - Static Instance
5:42 - Public Access Modifier
8:08 - Constructors
9:20 - MonoBehaviour "Constructor" (Init)
11:00 - OnCollision
11:50 - TryGetComponent
12:41 - GetComponent
13:03 - SendMessage
13:35 - Closing
Object References in Unity - How to Communicate Between ScriptsCreate a grid in Unity - Perfect for tactics or turn-based games! Part 2How to setup Global Matchmaking for UnityResponsive Camera Design in UnityUnity ragdolls! Make your characters floppy ;)Pathfinding - Understanding A* (A star)Create a server for your Unity game using .NET Core2D follow AI with Unity - [Tutorial]Create a grid in Unity - Perfect for tactics or turn-based games!Unity Vector3.Cross VisualizedHow to make a menu in Unity - UI TutorialValue & Reference types in C#. Write Better Code!
Tarodev |

Object References in Unity - How to Communicate Between Scripts

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER