D
D
Daniel2021-03-02 12:26:46
C++ / C#
Daniel, 2021-03-02 12:26:46

Why are Unity's Start Update methods not inherited?

As I understand it, these methods will be revealed through reflection.
And what is the point, why they are not virtual in MonoBehavior.
As I understand it, this is some kind of optimizing mechanism with # even. Where can I read about this technique.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-03-02
@vabka

Unity knows to run them even without inheritance. Due to the fact that they are not virtual, calling them becomes much cheaper.
Xs how it is implemented in the unit, to be honest.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question