Road TO Dev — Communicating with UI in Unity

Rob Smith
May 4, 2021

--

Ok now that we have the logic setup for what we want to communicate to the UI and know we can change it we need to make it happen. First in our UI Manager lets create a method for the player to communicate with and lets have it require the new information.

Now let’s create the communication on our player. First we need to tell the player what the UIManager.

Don’t forget to null check

Now just add the new communication where we tally up the score putting the score in the required field.

If everything is setup correctly our score text should update on the UI as we kill enemies.

--

--

Rob Smith
Rob Smith

Written by Rob Smith

Hi there! I am currently on the path to learn how to become a unity developer and will be documenting my journey as best as I can here. Thanks for looking!

No responses yet