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.
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.
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?
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!
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.
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.
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
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.
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.
Was looking for basics, but get much more useful examples. That's a quality content! Thank you!
Enjoy your unity adventures
Exactly what I needed. Short and informative! Thanks man!
so competently! it's super! ❤
Nice video.If shape class is inherited from Monobehaviours ,why dont our update and start functions use override word ?Anyone knows the answer ?
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.
Are there other things besides monobehavior?
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?
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 😯
@@Tarodev Hopefully it will be the piece that makes this video make sense.
Learn the basics of OOP first,
thaks for the advice but how do I install it directly to my unity program
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!
Thanks elain. Good feedback as I also enjoy nice quick tutorials. I'll keep it in mind for the future!
That's also why RUclips allows speed adjustment so each viewer can watch at their desired speed.
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.
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.
@@Tarodev what is the use for var in this code, sorry I am a beginner and couldn't understand it
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
Good vidio :)
Thanks lol