Jump to content

How to detect if a specific mod is installed?


Recommended Posts

I've lost the source where I found this - think it was Sarbian that posted this:

bool isThatModLoaded = AssemblyLoader.loadedAssemblies.Any(a => a.name == "TheModName");

Link to comment
Share on other sites

internal static bool IsModInstalled(string assemblyName)
		{
			Assembly assembly = (from a in assemblies
								 where a.FullName.Contains(assemblyName)
								 select a).FirstOrDefault();
			return assembly != null;
		}

Returns true if the passed in string matches a loaded assembly name.

eg:

Bool IsEveInstalled = IsModInstalled("EveManager");

Sorry for the formatting. This forum software is not phone friendly

Edited by JPLRepo
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...