SOLID, Object Oriented Programming and Profiling w/ Unity 5
4.1 (18 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
163 students enrolled
Wishlisted Wishlist

Please confirm that you want to add SOLID, Object Oriented Programming and Profiling w/ Unity 5 to your Wishlist.

Add to Wishlist

SOLID, Object Oriented Programming and Profiling w/ Unity 5

Develop a "Guitar Hero like" game with Unity 5.6. Part 2 : Design & Architecture, making it SAFE, SIMPLE and FAST!
4.1 (18 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
163 students enrolled
Created by Fred Moreau
Last updated 7/2017
Curiosity Sale
Current price: $10 Original price: $90 Discount: 89% off
30-Day Money-Back Guarantee
  • 1.5 hours on-demand video
  • 23 Supplemental Resources
  • 1 Practice Test
  • Full lifetime access
  • Access on mobile and TV
  • Assignments
  • Certificate of Completion
What Will I Learn?
  • Enjoy the benefits of proper Object Oriented Programming with Unity.
  • Take advantage of OOP fundamentals (Abstraction, Encapsulation, Inheritance and Polymorphism).
  • Apply SOLID Design Principles.
  • Take advantage of C# Events, Interfaces, Abstract and Generic Classes.
  • Use Eager or Lazy evaluation depending on the context.
  • Use the Profiler with custom samplers and recorders to benchmark different designs.
View Curriculum
  • Being familiar with Unity Editor and MonoDevelop (or Visual Studio).
  • Being familiar with Unity C# basics (MonoBehaviour).
  • Having followed the Model-View-Controller course (optional).

This course is the second chapter of a series of training on Unity, focusing on team work between designers, artists and programmers.

Every chapter in this series touches on a specific subject of the game industry. This course follows on the previous chapter, touching on the model-view-controller design pattern and covers everything you need to know about software architecture with Unity.

In this chapter, we're going to start of the end of the previous chapter in which we started to build the data structure and base architecture of a Guitar Hero, or Tap Tap Revenge like game.

As suggested in Agile practices, we're going to start with a simple requirement, which will allow us to think the architecture of the project. We're going to add a Debug Helper component, so that designers, artists and QA can easily test features. We're going to split Inputs from the Controller to make it easier later to support multiple platforms. And we're also going to add depth to our TrackView so that it can be easily enhanced in the future.

We're going to review, and put in practice the Object Oriented Programming fundamentals (Abstraction, Encapsulation, Inheritance and Polymorphism), and take advantage of Abstract Generic Classes and C# Events.

We're also going to apply the SOLID design principles :

  • Single Responsibility Principle
  • Open Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion Principle

We'll touch on evaluation and compare Eager evaluation and Lazy Evaluation, outlining their benefits in the context of video game development.

Last but not least, we'll add custom profiling code to our classes and use the Profiler to compare the footprint of different designs.

At the end of the course, programmers will have all the necessary knowledge and skills to design a game architecture to empower other programmers as well as artists and designers in the team.

Who is the target audience?
  • Unity developers willing to become experts.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
28 Lectures
6 Lectures 09:47

Fred Moreau, Game Developer, Unity Instructor and Agile Coach.

Preview 01:23

Unity Workshops Series overview.

Preview 00:28

An overview of the current project.

Preview 01:22

A description of current project design and architecture.

Current project architecture.

A quick overview of the SOLID design principles.

SOLID Principles
Adding a Debug Helper component.
5 Lectures 17:34

Creating a Debug Helper tool component to help other programmers, designers and artists understand the game flow and major events.

Debug Helper

Binding the Debug Helper component to the GamePlay Controller with loose coupling.

Binding the Debug Helper

A short explanation of Eager and Lazy evaluations, and when to choose one or the other.

Lazy vs. Eager evaluation.

Adding support for more events, in respect to SOLID principles.

Adding more events.

An overview of the difference between Push and Pull design. Reversing code flow using C# events.

Push vs. Pull design pattern.
4 Lectures 15:57

Binding the TrackView just like the Debug Helper, and removing all previous references to the TrackView from the GamePlay Controller.

Binding the TrackView

Using Abstract classes to keep all common properties and capabilities of classes under a common class.

Using Abstraction

Using Generic classes to implement type free code.

Creating Generic Classes

Using what you just learnt about Generic classes, implement an AudioSource version of the TrackView, that plays different AudioClips when the note is "missed", played "right" or "wrong".
Implement an AudioSource type TrackView
3 questions

Overview of the Animator type TrackView, and setting it up in the Editor, using animations and Animator State Machines.

*DO NOT FOLLOW ALONG THE VIDEO*. The video is short enough to be viewed a few times. Watch it once, takes notes, watch it again, then do it yourself, and watch it again if you missed something.

Using the Animator component.
4 Lectures 07:32

Using Generics with multiple types.

Multiple Types

Using SendMessage() as a generic method caller.


Using an Abstract class to implement specific event handlers on an object.

Abstract Base Class

Using Interfaces to implement several event handlers on an object.


How do you know you comply to SOLID Design and Object Oriented Programming principles ?

SOLID Design principles & Object Oriented Programming
6 questions
5 Lectures 12:53

Using Unity's built-in Profiler to benchmark scripts performances.

Using the Profiler.

Profiler sampling limitations.

Custom Samplers.

Implementing a custom profiling sampler.

Profiling Samplers.

Using a profiler custom sampler recorder data to display performances on screen.

Profiling Recorders.

Using conditional stripping to remove profiling code from final builds.

Conditional Stripping.
Wrap Up
2 Lectures 05:10

Using all we've learned, remove input management from the GamePlay Controller to put it into a different component.

Input Module.

Reviewing all we've learnt in this chapter.

Preview 03:36
Going further.
2 Lectures 06:21

This video touches on accessibility to collections, like arrays, Lists and Dictionaries.

Using C# Indexers to reference collections' members.

This video touches on splitting a class declaration across several files, using the ‘partial’ keyword.

Using 'partial' classes to split responsibility among programmers. [Caution]
About the Instructor
Fred Moreau
4.5 Average rating
129 Reviews
728 Students
7 Courses
Game Developer, Unity Instructor, Agile Coach

Coach and Consultant - Design & Development, Business, Training

[ English ]

With a strong technical expertise and a taste for design, I've had the opportunity to lead teams of creative people through development of innovative projects.

I'm passionate about learning and training, I started giving training early and have been involved in training certification programs. When you work in this industry, sharing your knowledge is not only a duty, it's the opportunity to learn even more.

I'm a self-taught developer myself. I work with Unity since 2011, and was very lucky to meet with mentors who taught me a great deal about OOP. That's a lot to learn about when your background is not in engineering, though, I figured that if I could do it, anyone can.

[ Français ]

Je suis passionné par l’apprentissage et l’enseignement. J’ai donné mes premières formations très tôt et me suis impliqué dans les programmes de certifications de grands éditeurs. Quand on travaille dans cette industrie, partager ses connaissances est plus qu’un devoir, c’est aussi le meilleur moyen d’apprendre d’avantage.

Je suis développeur autodidacte. Je travaille avec Unity depuis 2011 et j’ai eu la chance de rencontrer d’excellents mentors qui m’ont beaucoup appris sur la programmation objet.
C’est beaucoup de choses à apprendre lorsque vous n’avez pas un parcours d’ingénieur. Cependant, si j’y suis parvenu, n’importe qui peut en faire autant.