Awake() & Start() in MonoBehaviourPunCallbacks
Options
I am following the PUN Basics tutorial and in Step 1, MonoBehaviourPunCallbacks replaced MonoBehaviour as the Parent class of Launcher.
I am curious how MonoBehaviourPunCallbacks has the method Awake() & Start() which belongs to MonoBehaviour class?
There is no error in the IDE when I expect it to have errors.
I am curious how MonoBehaviourPunCallbacks has the method Awake() & Start() which belongs to MonoBehaviour class?
There is no error in the IDE when I expect it to have errors.
0
Comments
-
Hi @Veneni,
MonoBehaviourPunCallbacks
extendsMonoBehaviour
.
That's why it can have all MonoBehaviour messages methods.
when you extendMonoBehaviourPunCallbacks
, overrideOnEnable
andOnDisable
which are already implemented in the base class and you could implement other MonoBehaviour methods .1 -
Ah thanks ! I cannot find this inheritance of
MonoBehaviour
inMonoBehaviourPunCallbacks
documentation.0