Static vs Instances | Unity C# Basics Part 4 @LlamAcademy
Static vs Instances | Unity C# Basics Part 4  @LlamAcademy
Uploaded April 2022 | Updated September 2026, 2 hours ago
Learn about what "instance"s are, what's the difference between those and "static", and a common design pattern that uses both of these! If you've been following along in the series, you've already used both instances and static properties, maybe without knowing it! Today you will learn about what each one is and when you should use static or an instance. We'll also review the limitations of each type to deepen your understanding!

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!

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

📝📝📝YOUR HOMEWORK!📝📝📝

Create a static function that will create a prefab at a given location.
Bonus: Make it a singleton class with a local / instance function instead of a static function!

Add a comment below with a video showing your code and the end result.

🔶 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-3
🏷️Save 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: jetbrains.com/store/?section=personal&billing=yearly

📚 Here are the resources I mentioned and/or brought up during the video 📚
🟠 "this": docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/this?msclkid=df5ad20dbbe311ec97ddfab7d4a4fe95
🟠 "static": docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/static
🟠 Static classes: docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members
🟠 Screen: docs.unity3d.com/ScriptReference/Screen.html
🟠 Singleton: en.wikipedia.org/wiki/Singleton_pattern

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

Chapters:
00:00 Introduction
01:43 "this" Keyword
03:15 Static vs Instance Variables & Static Restrictions
08:30 Static vs Instance Functions
09:27 Static Classes
10:18 Controversial Design Pattern
12:47 Homework!
Static vs Instances | Unity C# Basics Part 4While upgrading from Built-In Pipeline to URP I found an issue with the Decal Projector #ShortsCinemachine Transposer & Composer for Top-Down Object Targeting | Unity TutorialHow to Implement a Touch Movement Joystick Using the New Input System | Unity Tutorial #shortsAnimator Transition Interrupt Sources, Explained | Unity Tutorial #shortsAdvanced NavMesh Usage - Beyond Simple SetDestination | Unity Tutorial4 Unity Destruction Libraries Compared - Which is best for you?Waves in ShaderGraph by Vertex Displacement | Unity Tutorial #shortsDecals in URP & HDRP #ShortsProjectile Guns | Scriptable Object Gun Series 6 | Unity TutorialUnity Tip - Quickly Offset Numbers in the InspectorTouch Movement Joystick Using the New Input System | Unity Tutorial
LlamAcademy |

Static vs Instances | Unity C# Basics Part 4

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER