From the course: Unity 5: Build a Character Dialogue System
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
The Atlas Manager - Unity Tutorial
From the course: Unity 5: Build a Character Dialogue System
The Atlas Manager
- [Instructor] Since Unity doesn't support direct calls to individual images inside a texture atlas, we need a helper class to manage all of that for us. In our scripts folder, let's create a new C# class, by right-clicking Create, C# Script. We're going to name that AtlasManager. Double-click to open it up and let's delete the Start and Update functions, since we won't be using them. Since we want this script to use our new interface IManager, we need to add it here, right after MonoBehavior, add a comma, and IManager. Next, we need to include the current state property and boot sequence method to satisfy the interface requirements. Let's make some room and on line seven, go ahead and type public ManagerState currentState and inside the brackets, we're going to have a public getter and a private setter. We're using a private setter because if we don't, other classes could change the ManagerState, which is something we especially don't want. This'll keep each ManagerState locked to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.