From the course: Unity 5: Network Gaming

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

The local player

The local player - Unity Tutorial

From the course: Unity 5: Network Gaming

Start my 1-month free trial

The local player

- We've got our tanks running independently of each other, but we have a usability issue. With two tanks, it's not too bad, but if it were a dozen or more, all our tanks look exactly alike. It would be nice if we could identify our tank versus everyone else's. There are a lot of graphical treatments we could use here. Since we're focused on coding for this course, the simplest treatment would be just to change the color of our tank. We can do this in our Tank Controller Script. Find your tank in the Assets window. Find the Tank Controller Script and double-click it to open it in your Code Editor. I'm sure you're familiar with the start method that generally acts as the constructor in Unity scripts. It's right here on line 10. In an earlier video, we changed the class that it's inherits from, from MonoBehavior to NetworkBehavior. And as I mentioned, there are network corollaries to most of the common events that you're used to. And this is no exception. We're going to use a network…

Contents