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!
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 ;)
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
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.
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.
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.
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!
Thanks. Now I get it. After watching many complex refactoring videos. This is the simplest example of solid principles.😁😁
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 ;)
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
Thank you for clearly explaining DIP.
great videos, simple yet cover the context. thumbs up
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.
Wouldn't work because the `RequireComponent` doesn't accept the type of a interface.
Now I get it. Thanks.
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.
Awesome!
So ... where is the video about mocking the input?
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.