@Roundbeargames
  @Roundbeargames
Roundbeargames | C# Generics Explained - Unity Tutorial @Roundbeargames | Uploaded October 2019 | Updated October 2024, 2 hours ago.
C# Generics Explained - Unity Tutorial

A lot of people were having trouble understanding the Singleton script,
mainly "T" and "where T: MonoBehaviour"
(maybe not so much with the singleton pattern itself, so this is NOT a video on singletons)

If you're looking for a singleton script, check out my files here (Singleton included):
drive.google.com/drive/folders/17Lfpa5r-3zeR1jaT0eJ4nqIR3pkU9ABE?usp=sharing

T refers to generics where you don't have to specify a single class or a method. I use T for the Singleton class because I don't know which classes are going to inherit from it (CharacterManager, VirtualInputManager, CameraManager, etc). Generics allow different managers to inherit from the same Singleton class. It's like saying "a class can inherit from Singleton, where that class has to be a MonoBehaviour".

After watching this video, if you're still having trouble understanding the code, I'll create another video for singletons.
For now check out this video:
youtu.be/hUE_j6q0LTQ

EDIT: here's my video on singletons
youtu.be/92NQVeFiDeY

Download my project:
github.com/RoundBearChoi/2.5D_Platformer_Unity

Tutorial playlist:
youtube.com/playlist?list=PLWYGofN_jX5BupV2xLjU1HUvujl_yDIN6

Any questions/comments? Join us on discord:
discord.gg/hAFTgcA

Social
twitter: twitter.com/roundbeargames
facebook: facebook.com/roundbeargames17
hive: peakd.com/@roundbeargames/posts
reddit: reddit.com/user/roundbeargames
linkedin: linkedin.com/in/jangwon-choi-roundbeargames

Patreon:
patreon.com/roundbeargames

Channel Memberships:
youtube.com/roundbeargames/join

#gamedev #indiegame #unitytutorial #devlog
C# Generics Explained - Unity TutorialAdding and Subtracting Vectors - GameDev Prep CourseDevlog #2 - Unity Multiplayer Game - C# Networking#6 Physics & State Machine - Unity Tutorial - Devlog#7 Jumping Animation - Unity TutorialFPS Game WIP - Playing my own prototype with a friendDevlog #1 - Rigidbody 2D Character Control - Unity[Devlog #6] Air Combo - Unity 2.5D Platformer[C++ Tutorial #0] Lets Install Visual Studio 2019Gamedev - Code With Me #7#1 Starting a Unity Project | Unity Devlog#2 RigidBody & Player Controller (Part2) - Unity Tutorial

C# Generics Explained - Unity Tutorial @Roundbeargames

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER