Dependency Injection Is Simple & Powerful!

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

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

  • @lokosstratos7192
    @lokosstratos7192 Месяц назад

    I really like how easy it is to absorb and listen to your explanations.
    Very simple and powerful!
    why don't you make a game course or something on platform like skillshare or udemy etc.
    you are far more knowledgeable than most instructors I've seen on these sites.

    • @freedomcoding
      @freedomcoding  Месяц назад

      Hi, thank you very much for these kind words! I have that on my list. I will be making more in-depth tutorials (like mini courses) on my Patreon and will see how it goes. I also plan to make some courses on Udemy once I am 18.

  • @TheKr0ckeR
    @TheKr0ckeR Месяц назад

    This is cool, but if we have a lot of plain classes, there will be so many things in player, for example player interaction, player state system etc. Player class now has all the dependencies. How to handle that? This structure leads to monolithic monobehaviour classes that controls them like calling mover.Move in update. There will be many more to come which leads player script to have a lot of instances etc. Do you recommend Zenject etc. 3rd party tools that allow more flexible implementations

    • @freedomcoding
      @freedomcoding  Месяц назад +1

      Yes you are right. In most of the cases I would rather use the composition pattern. This is what Unity was made for. But dependency injection can be still useful in many cases. I would combine those two techniques.

  • @MinecraftCoinAirdrop
    @MinecraftCoinAirdrop Месяц назад

    Pls make Unity Netcode Save System to JSON

    • @freedomcoding
      @freedomcoding  Месяц назад

      I don't think this would be that different from classic saving to JSON. The only difference would be sending the data across the network, which I think could be done using NetworkVariable.

  • @risingforce9648
    @risingforce9648 Месяц назад

    The rigidbody is not hard dependency? it is a component reference class, not and instance.. it is relation ship, association ..

    • @freedomcoding
      @freedomcoding  Месяц назад

      Yes the Rigidbody is a dependency. Without it the Player class would not work, as it is dependent on it.

    • @risingforce9648
      @risingforce9648 Месяц назад

      @@freedomcoding ..ok thanks .

  • @fredm.1761
    @fredm.1761 Месяц назад

    There is a bug in Unity with input fields... It looks like even Unity himself cannot fix it for 9 years now.
    When you have an in app custom keyboard (on android build) you can't edit input field properly... Problem is with the caret which is always at the end. Even if you put it in the middle of whatever you wrote, the next character inserted will always be at the end.
    Could you find a workaround please, you'll be famous 😂🙏

    • @freedomcoding
      @freedomcoding  Месяц назад

      Interesting... I would never think such an error exists :D I may be famous, but how many people even know about that error? Anyways it is currently not something I am interested in, but thanks for letting me know!

    • @fredm.1761
      @fredm.1761 Месяц назад

      @@freedomcoding Well I guess I misunderstood the part where you invited viewers to submit their problems to help them with it.

    • @freedomcoding
      @freedomcoding  Месяц назад

      @@fredm.1761 No, you understood it correctly. I thank you for your suggestion, but the topic you suggested would from my point of view help only few people.

    • @fredm.1761
      @fredm.1761 Месяц назад

      @@freedomcoding I think you might be wrong here, just google for "unity input field not working" and you will find lots of threads about it...
      But anyway I don't want to argue with you about it... What about to pay you to do the app ?

    • @fredm.1761
      @fredm.1761 Месяц назад

      I think you might be wrong here, if you google "unity input fields not working" you'll find a lot of threads from people having this issue. But no problem that's your point of view....
      Would you help doing my app if you get paid at least ?

  • @fredm.1761
    @fredm.1761 Месяц назад

    Did you blacklist me ??? Looks like I can't post here anymore... If so I have to unsub unfortunately...

    • @freedomcoding
      @freedomcoding  Месяц назад

      Why do you think so? I don't remember blacklisting anyone. I don't even know how to do that :D

    • @fredm.1761
      @fredm.1761 Месяц назад

      @@freedomcoding I didn't believe it... That's weird, 2 Times I posted and it didn't even show.
      So I post for the 3rd time :
      You might be wrong here, there are lots of people having this issue, just Google "unity input fields not working" and you will find multiples threads about it...
      But that's your point of view and I respect it...
      I really need help with this app so what about paying you to make it for me ?