Delegates, Events, Actions and Funcs - The Observer Pattern (Unity & C#)

The observer pattern is essentially baked into C# and Unity. It comes in the form of delegates, events, actions, and to some extent funcs. The observer pattern de-couples the source of information from the object receiving the information. This makes unity projects more stable, easier to add mechanics, and far less likely to break. Blog Post Covering the Observer Pattern: https://onewheelstudio.com/blog/2020/... Sebastian Lague's Delegate Series:    • [C#] Delegates and Events (E01: delegates)   Become A Channel Member:    / @onewheelstudio   Buy me a coffee: https://www.buymeacoffee.com/onewheel... My video and streaming kit: https://kit.co/onewheelstudio/tutoria... Game Design Reading Suggestions: https://kit.co/onewheelstudio/game-de... Discord: http://discord.onewheelstudio.com Patreon:   / onewheelstudio   Twitter:   / onewheelstudio   Devlog: https://onewheelstudio.com/ Twitch:   / onewheelstudio   Video Gear List (Amazon Affiliate) ************ Sony A6100 Camera: https://amzn.to/32logXz Camera Lens: https://amzn.to/3KA4Wr4 GoXLR (audio interface): https://amzn.to/35dmr03 Shure SM7B Mic: https://amzn.to/3fNbV1E Blue Mic Arm: https://amzn.to/3tHgwdQ Neewer Light: https://amzn.to/3rD8eRv Light Softbox: https://amzn.to/3GUaHgQ Neewer RGB Light: https://amzn.to/3rCTQJ9 TimeCodes 0:00 Why you need the Observer Pattern? 1:20 Problems Solved 1:38 What does the Observer Pattern do? 2:41 What Are Delegates? 4:45 Defining Delegates 6:21 Delegate Parameters & Return Values 7:13 Multicast Delegate 8:01 Static Delegates 8:17 Events 9:08 Actions and Funcs 9:40 Observer Pattern Implementation #ProgrammingPatterns #ObserverPattern #UnityTutorial #GameDevelopment