Overwriting Awake() of a class derived from DataBindingOperator prevents it to be initialized

Issue #56 resolved
Christian Oeing repo owner created an issue

The Unity internal methods are private, and if a derived class implements those methods, too, the ones from the base class are not called.

So those methods should be protected in the DataBindingOperator base class: - Awake - OnDestroy - OnEnable - OnDisable

They already call virtual methods which can be overwritten in derived classes, but setting the visibility to protected prevents them to be overwritten by accident.

Comments (2)

  1. Christian Oeing reporter

    Make Unity callbacks protected in DataBindingOperator, so there is at least a warning when overriding them instead of the virtual methods

    A derived class should use the virtual methods (Init, Deinit, Enable, Disable) instead of the Unity callbacks, so the initialization order remains correct.

  2. Log in to comment