Get a define in code if plugin is loaded and build into project.

Just want to add even though i didnt find the solution from this thread i ended up stumbling on the IPluginManager and that helped me achieve the exact same functionality so this does in fact work.