Enhanced MonoBehaviour - edcasillas/unity-common-utils GitHub Wiki

Derive from EnhancedMonoBehaviour instead of MonoBehaviour to get access to the following perks for free:

  • Expose properties and methods at runtime to the Inspector using the [ShowInInspector] attribute, no need to define a separate custom editor.
  • Use the this.DebugLog extension method to write selective log messages to the console. The EnhancedMonoBehaviour base class already implements IVerbosable and defines a verbosable flag that can be set in the Inspector.
  • Have the IUnityComponent interface already implemented in the class, so decoupling it from its dependencies becomes easier.