playMaker

Author Topic: Reminder to allow inheritance :p  (Read 2450 times)

Andy22

  • Junior Playmaker
  • **
  • Posts: 99
Reminder to allow inheritance :p
« on: November 26, 2013, 10:28:41 AM »
Hi,

the couple of times i tried to add a small feature to a existing action, i always did run into the problem that the common used "DoXY" function or some cached field was not declared "protected/virtual".

As example i tried to extent the GetComponent action to allow childs, but unfortunally i have to copy&paste the whole action, rather than extending + override "DoGetComponent".

So if possible declare those calls as virtual and other fields/cache as protected. If needed rather use "sealed" on the class, if its not designed to-be inherited.

Thx Andy
« Last Edit: November 26, 2013, 10:38:15 AM by Andy22 »