S.O.L.I.D Design Patterns - Unity - Dependency Inversion Principle

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024

Комментарии • 14

  • @dannytbm
    @dannytbm 5 лет назад +10

    Just got my first job as a software engineer, slightly unexpectedly. Subbed a while ago for the Unity stuff but this series has been amazingly helpful for me. Thanks a tonne!

  • @Indiechicha249
    @Indiechicha249 2 года назад

    Thanks. Now I get it. After watching many complex refactoring videos. This is the simplest example of solid principles.😁😁

  • @NerdyTalking
    @NerdyTalking 5 лет назад +8

    Hi Dino, great video as usual!
    Just one small thing, be careful that you left a duplicated take on your video. At 1:40 you introduce the project and the code and at 2:05 you do it again.
    You can trim that part out in in the editor section of youtube studio ;)

    • @DapperDinoCodingTutorials
      @DapperDinoCodingTutorials  5 лет назад +3

      Thank you so much for pointing that out :D I don't think I've ever had a cut slip into the final video before but it was quite a short cut so I guess I missed it. Thanks for the heads up

  • @carlomontoya
    @carlomontoya 4 года назад

    Thank you for clearly explaining DIP.

  • @richnaisanze
    @richnaisanze 4 года назад

    great videos, simple yet cover the context. thumbs up

  • @killshotairsoft2
    @killshotairsoft2 4 года назад +1

    If you wanted to make the Mover class require the interface, you could put [RequireComponent(typeof(interfaceName))] above the class declaration. This makes you unable to add the mover class to a game object until you add some monobehavior with the interface implemented. As such, it can never be the case that the interface reference comes back as null.

    • @danygagnon8446
      @danygagnon8446 3 года назад +2

      Wouldn't work because the `RequireComponent` doesn't accept the type of a interface.

  • @-.._.-_...-_.._-..__..._.-.-.-
    @-.._.-_...-_.._-..__..._.-.-.- 3 года назад

    Now I get it. Thanks.

  • @danielvillalba4457
    @danielvillalba4457 4 года назад +1

    Nice video, just a quick question, is there any significant performance difference between use the GetComponent approach vs. use a DI container like ZenJet ?, personally it feels more natural to use the GetComponent one on Unity.

  • @SealDev
    @SealDev 4 года назад

    Awesome!

  • @pouya1423
    @pouya1423 4 года назад

    So ... where is the video about mocking the input?

    • @BrandonNyman
      @BrandonNyman 6 месяцев назад +1

      They basically mocked the input here with the constant mover, which added fixed values to move. Then you would use the input axis mover when you have your player.