Комментарии:
Wow. Just wow. Probably the best and simplest explanation of generic classes i've seen around. Well done, man!
ОтветитьI'm more smart now.
ОтветитьThank you!
ОтветитьI still find it very complicated when the right constraints and interfaces have to be implemented for equality/inequality compares, mathematical functions, etc to work. In my experience generics start very well as an idea but then sometimes I’m met with knowledge needed that I just don’t have yet.
Great example on generics nevertheless, I do like the Pool system and a way to get all of the types from a shape. Can be used for many things, ability systems, collectible items types, etc etc... maybe mix-able with scriptable objects of sorts, to think about.
Can i ask you i questions do you work with team or you area solo developer like myself
ОтветитьFrom what i understand the list is samthin very useful but i still don't get it how it works the only thing i understand is i add same type off faction for example cameras but i don't get how the understand which camera or what ever type off faction i want to add?
For example if have 5 camera on my sean how that list knows to which off this cameras is the correct camera
Awesome, thank you!
ОтветитьAfter watching this video, I went down a rabbit hole. My couple ongoing projects have me CONSTANTLY using the same couple lines of code to pull a random element from a list/array, so after this video I realized I can just make a static class and utilize the new knowledge about generics. Talked about it with a few people in a Discord server and one person hinted that I should go one step further and make it an extension method.
Had no idea what they were, so I looked up them up, and when I figured that out, I had a glorious script that I can keep for future projects too. Even made some overloads for things like returning a list of multiple selections - with the option of also making sure each element is distinct, being able to also input a blacklist, etc. So now I can just use [List Name].SelectRandom().
Extension methods could be a neat video idea too. I'm definitely gonna be exploring them more, but either way, thanks for the video, and leading me to learning several new things!
Did you create odin?
ОтветитьThese videos are amazing. So far I've watched exactly two, once each. Both times, I've grasped a concept that had eluded me for months of trying with a ton of other sources.
Can't overstate how good it feels to just... understand. You are a wonderful teacher. Thank you.
Thanks for Tutorial!!
Can you make a Tutorial of AssetBundles Build and Load please?
This is the most amazing video I have ever watched on this topic.....
Thanks!
Coool
ОтветитьThat's the greatest generics explanation so far! Thank you
ОтветитьThank you so much for making these tutorials, incredibly helpful and cristal clear explanations. I just discovered your channel and I guess I'm going to be watching a LOT of your videos. Cheers !
ОтветитьThe way you explain and teach is so helpful to me. Sometimes I watch other content and it takes multiple videos for new programming concepts to sink in, but I understand what you're explaining on the first go-around. Thank you!!
ОтветитьUnderratedd!!!
ОтветитьGreat video, perfect pacing and content. Awesome!! :)
In my own project, I think I might have made it too complicated for myself. I have problem reaching my script via code.
I have my base-weapon-script like this:
public abstract class WeaponBase<T> : MonoBehaviour, IWeapon where T : WeaponDataBase
then my different weapons inherit like this,
public class WeaponStanardProjectile : WeaponBase<WeaponStandardData> (WeaponStandardData being a Scriptable Object that is of different types)..
The problem I'm facing is trying to reach this weapon-script via code, turning the scrip on (when a weapon is picked up, and off then its dropped) . Seem the GetComponent() don't work for generic scripts?
When using inheritance as a form of strongly typed "tags", would it not be better to use an empty interface so as to be able to have more than one "tag" if needed?
Ответить