Inheritance and Interfaces for Beginners | Unity C# Basics 6 | Unity Tutorial @LlamAcademy
Inheritance and Interfaces for Beginners | Unity C# Basics 6 | Unity Tutorial  @LlamAcademy
Uploaded July 2022 | Updated November 2026, 3 hours ago
With this tutorial, aimed at absolute beginners who have very little to no coding experience whatsoever, you'll learn what Inheritance is (it's not passing on hereditary traits or getting money!), how to use it (you already are using it!), what an Interface is, how to use it, and what the difference between the two are!

If you've been using Unity for a while, or are just getting started with Unity and decided it's time for you to start learning how to write code - this is the video series you need to start your programming journey!

๐Ÿ“๐Ÿ“๐Ÿ“YOUR HOMEWORK!๐Ÿ“๐Ÿ“๐Ÿ“

Do some data modeling for enemies that can attack the player. Starting with 3 types:
1. Melee enemy
2. Ranged enemy
3. Boss enemy

Create inheritance relationships and interfaces to allow you to group common code and variables, define "can-do" relationships that allow you to extend what enemies and bosses can do in the future without significant rework.

๐Ÿ”ถ ALL THINGS LlamAcademy now available at: https://llamacademy.dev/support including latest tutorials, courses, ways to support, and more! Check it out ๐Ÿ™‚
๐Ÿ‘จโ€๐Ÿ’ป Get the FULL FREE PROJECT on GitHub: github.com/llamacademy/unity-csharp-basics-6
๐Ÿท๏ธSave 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: jetbrains.com/store/?section=personal&billing=yearly

๐Ÿ“š Resources
๐ŸŸ  Unity MonoBehaviour: docs.unity3d.com/ScriptReference/MonoBehaviour.html
๐ŸŸ  C# Fundamentals - Inheritance: docs.microsoft.com/en-us/dotnet/csharp/fundamentals/tutorials/inheritance
๐ŸŸ  C# Access Modifiers: docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/access-modifiers
๐ŸŸ  C# Interface: docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/interface
๐ŸŸ  C# Virtual: docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/virtual
๐ŸŸ  C# Overriding methods: docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/knowing-when-to-use-override-and-new-keywords

Full Series Playlist Here: youtube.com/watch?v=SXaa61JWLDw&list=PLllNmP7eq6TTjwoyfRYAAFOH1sMHVgI1r

๐ŸŸ  Part 1 - Writing your first script - youtu.be/SXaa61JWLDw
๐ŸŸ  Part 2 - Loops and Arrays - youtu.be/MB6B9nHSrps
๐ŸŸ  Part 3 - Unity Component Lifecycle - youtu.be/TD3yoFg3GVI
๐ŸŸ  Part 4 - Static vs Instances - youtu.be/JRRlAzBh-6U
๐ŸŸ  Part 5 - Delegates - youtu.be/1N6k7Hj_JKc
๐ŸŸ  Part 6 - Inheritance & Interfaces - youtu.be/siRvSZzrhRU
๐ŸŸ  Part 7 - Compositional Relationships - youtu.be/khIweJfnyW4

Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.

Chapters:
00:00 Topic Introduction - You've already been using Inheritance!
01:15 Inheritance Relationship Defined
02:40 Inheritance by Real Life Example
05:20 Interfaces - Definition, Examples, and Benefits
09:28 Relating it all back to Unity
10:48 What's Inheritable from the Parent? (Access Modifiers)
13:33 Hands-on Exercise using Inheritance
18:44 Scene Updates & Demo
21:00 Homework! Review & Next Assignment

Hereditary Inheritance image early in video By Simon Caulton - Own work, CC BY-SA 3.0, commons.wikimedia.org/w/index.php?curid=25538642
Inheritance and Interfaces for Beginners | Unity C# Basics 6 | Unity TutorialProcedural Mesh & Animation with the Official Unity Spline Package | Unity TutorialRoot Motion NavMeshAgent Animation | AI Series Part 42 | Unity TutorialAnimated 3D Models on the UI with URP | Unity TutorialFade Objects with C# and the Standard URP Shaders | Unity TutorialHow Use Git with Unity! Itโ€™s FREE, Easy, and Saves Your Bacon!Procedural Recoil and Bullet Spread | Gun Series 2 | Unity Tutorial #ShortsAccurate Aiming Options Discussed & Implemented | Gun Series 7 | Unity TutorialRead Texture Data from C# Scripts | Unity Tutorial1 Scene INFINITE Levels by Spawning Levels from ScriptableObject Data at Runtime | Unity TutorialBlend Between Textures in a Shader (Vertex Colors) | ShaderGraph  Unity TutorialVisualize a NavMesh, In Game! | AI Series 45 | Unity Tutorial
LlamAcademy |

Inheritance and Interfaces for Beginners | Unity C# Basics 6 | Unity Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER