MonoBehaviour? Let me teach you my guy [Unity Tutorial]

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

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

  • @AsciiKing
    @AsciiKing 2 года назад +6

    Great video. I love how short and clear these are. I've been using Unity for years and I am a bit ashamed to admit that I have never really understood monobehaviour until now. Thank you very much. I think that the Unity development team should use you for their how to videos.

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

      Yeah me too. Basically unity is component based so you need monobehaviour to attach scripts as a component and add a behaviour to game objects.

  • @DevX_off
    @DevX_off Год назад +2

    Was looking for basics, but get much more useful examples. That's a quality content! Thank you!

    • @Tarodev
      @Tarodev  Год назад +1

      Enjoy your unity adventures

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

    Exactly what I needed. Short and informative! Thanks man!

  • @zuzuBoba
    @zuzuBoba Год назад +1

    so competently! it's super! ❤

  • @changemaker9751
    @changemaker9751 2 года назад +2

    Nice video.If shape class is inherited from Monobehaviours ,why dont our update and start functions use override word ?Anyone knows the answer ?

    • @Tarodev
      @Tarodev  2 года назад +5

      So unity uses what they call 'magic functions'. At compile time they look through MonoBehaviours for specially named function (using reflection) and hook into them.

  • @rmt3589
    @rmt3589 Год назад +1

    Are there other things besides monobehavior?

  • @mrprofile101
    @mrprofile101 2 года назад +2

    At 00:20 you say "So as you can see, Shape is inheriting from MonoBehaviour" shape is inheriting what from MonoBehaviour? A mansion? A few grand in inheritance? Obviously these are ridiculous examples. But what does that actually mean to inherit from MonoBehaviour?

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

      Funny 😜
      I'd say this is a video about MonoBehaviour and not about inheritance though. I actually have a video coming out soon which covers that 😯

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

      @@Tarodev Hopefully it will be the piece that makes this video make sense.

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

      Learn the basics of OOP first,

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

    thaks for the advice but how do I install it directly to my unity program

  • @elain7737
    @elain7737 3 года назад +3

    Thanks for the video! I would say that you speak a bit slow; maybe a bit of editing can solve that, but other than that, the information was on point and overall a good video! Keep Going!

    • @Tarodev
      @Tarodev  3 года назад +1

      Thanks elain. Good feedback as I also enjoy nice quick tutorials. I'll keep it in mind for the future!

    • @taylorfreeman7782
      @taylorfreeman7782 3 года назад +8

      That's also why RUclips allows speed adjustment so each viewer can watch at their desired speed.

  • @adamgrey268
    @adamgrey268 3 года назад

    Is it possible to access the GameObject the MonoBehavior is attached to?
    Let me give an explicit example to clarify my question:
    I have a Hitpoints class attached to a GameObject and a Skills class attached to the same GameObject. I need to access the Constitution.Level from the Skills object so that the Hitpoints object can calculate the MaximumHitpoints.

    • @Tarodev
      @Tarodev  3 года назад +3

      You sure can. From your hitpoints script you can grab your skills script like so: var skills = GetComponent().
      This will search the current game object the script is attached to.

    • @buriedomasta3375
      @buriedomasta3375 2 года назад +1

      @@Tarodev what is the use for var in this code, sorry I am a beginner and couldn't understand it

    • @grapehool
      @grapehool 10 месяцев назад

      var is basically used when you don't know which datatype the variable is going to be, it automatically assigns the correct datatype on assignment just like python​@@buriedomasta3375

  • @noobcraft5712
    @noobcraft5712 3 года назад

    Good vidio :)

  • @Rakadeja
    @Rakadeja Год назад

    Thanks lol