mercredi 12 août 2015

How to simplify this C# syntax?

I use interfaces as a base for plugins in my C# app, this allows my plugin handler to call their functions.
Since none of the functions from the interfaces are necessary for plugins to have I've made an abstract class with virtual functions (with empty bodies) which I then override in plugins if they are needed.

In Unity I don't need to override the functions that Unity calls, I can just write void Update() {..}

Basically I'm asking how to avoid writing public override in front of every function in my plugins, how to make it so that I can write plugins the way I write components in Unity?

Aucun commentaire:

Enregistrer un commentaire