Null Object Pattern in Unity

preview_player
Показать описание
Code can be find in the Design Patterns GitHub Repo:

00:00 - Concept
08:13 - Equipment Example
Рекомендации по теме
Комментарии
Автор

Really good explanation man, I actually haven't thought of doing a null object before. Appreciate the video.

johnrex
Автор

This is clever / very useful and I'm embarrassed that I've never used it.
This also feels very similar to / an extension of the Strategy pattern?

christopherwalka
Автор

Whenever I restarted the scene, I'm having this bug that when the keeps duplicating when I restarted the scene. Do you have a source code for this?

lanayaassasin
Автор

Leave a comment to help to the chanel!

valerii-barabanov-vvb
Автор

i have one qustion is pasble to use if (null) { } ?
i understand your Pattern but i don't get it haw i use the null if needed for my code ?

watercat
Автор

This is actually a bad pattern imo. You want that errors so you can know what's wrong with the code. But with this pattern you might not even realize that there's something wrong going on.

INeatFreak