C# Delegates in Unity! - Intermediate Scripting Tutorial

preview_player
Показать описание
Watch this video in context on Unity Learn:

Delegates are containers for methods (functions). They can be thought of as a variable that be called like a function to invoke whichever methods are currently stored in it. In this video you will learn to make your own delegates and use them to call various methods.
Рекомендации по теме
Комментарии
Автор

delegate = container for function, like variables for values .. That´s what I needed to hear

vladimirkliman
Автор

Clearest explanation of delegates ever!

So basically,
we can use delegates to call multiple functions in one call!

TheEarlyAstrotype
Автор

not everyone has the gift to explain well.
loud and clear explanation. the best for unity learners on yt. thanks!

teennetworkce
Автор

Top job. This explains delegates far more clearly than any other specialist C# tutorial that I've seen.

SurreyMuso
Автор

Studying C# and your explanation of delegates is the simplest I've come across. Thank you!

Thoanga
Автор

Returning and watching these tutorials once I finaly understand the power and the use cases feels so great.

titastotas
Автор

Crystal clear explanation. I was having trouble understanding the purpose of these.

ignatiusreilly
Автор

This is the simplest explanation I've ever seen anywhere and I immediately understood how delegates worked. I've been spacing out so bad trying to figure this out myself since I couldn't wrap my head around the concept. This video easily made me understand the whole concept. Thank you!

lesarch
Автор

I've never used a delegate before and this explained it very well to me. Thanks!

matthewbrown
Автор

I think delegates are super useful for events and event-oriented programming in general. You could also use them to make an array of functions to use (eg in some kind of custom frame scheduler, if you needed some functions to run in a very specific order).

gregoryfenn
Автор

This is how a tutorial should be. Now i can remember delegates for a long time

gunasekhar
Автор

what a clear and precise explanation, chefs kiss

ishanrevankar
Автор

this lecture is soo good, maybe the best lecture on youtube about Delegates.

foreducation
Автор

Delegates clarity 100% achieved! Thank you so much!

wowgingermobile
Автор

Thanks for your explanation. The concept of "delegates" is now clear for me.

fulgencejuniorlohore
Автор

I bet this will help me understand C# events, which made no sense before

ksepastremenos
Автор

1) how to call a delegate in another script?
2) what does invoking an delegate mean?

Please answer

ansqad
Автор

I understand how to use it, but I don't get its use case. We could have just put PrintNum(50) in the start instead of the 4 lines of code that dose that. It would have been nice if they had some examples where this kind of functionality is needed.

changbroot
Автор

This was a great explanation.. clear and concise thanks a lot!

themediocre_coder
Автор

When will we have serializable delegates in the inspector so that we can stop relying on slow UnityEvents? Delegates are wonderful but due to lack of proper support, they do not mesh well with the unity workflow.

fahimfaysal