Detect multiple instances of a plugin

Hi.

If I want to prevent multiple instances of my plugin, what is the best way to achieve that?

Thanks

InterProcessLock ?

That won’t help in this case cause the host loads all plugins with the same process.

Why not just have a static int that counts the number of active plugins…?

That will do the trick… Thanks!