KSP API
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Public Attributes | List of all members
KSPAssembly Class Reference

This attribute and the KSPAssemblyDependency attribute can be used to ensure that plugin assemblies are loaded in the right order. More...

Inheritance diagram for KSPAssembly:

Public Member Functions

 KSPAssembly (string name, int versionMajor, int versionMinor)
 

Public Attributes

string name
 
int versionMajor
 
int versionMinor
 

Detailed Description

This attribute and the KSPAssemblyDependency attribute can be used to ensure that plugin assemblies are loaded in the right order.

Suppose Mod A depends on mod B, which is currently at version 2.6. Mod B should add the following line to the end of Properties/AssemblyInfo.cs:

[assembly: KSPAssembly("ModBName", 2, 6)]

where "ModBName" is the name of Mod B (Mod B's .dll?). Replace 2 and 6 with the major and minor version of Mod B.

Then Mod A should add the following line to the end of Properties/AssemblyInfo.cs:

[assembly: KSPAssemblyDependency("ModBName", 2, 6)]

This will tell KSP that Mod A depends on version 2.6 of Mod B, and ensure the the assemblies get loaded in the proper order.

Constructor & Destructor Documentation

KSPAssembly.KSPAssembly ( string  name,
int  versionMajor,
int  versionMinor 
)

Member Data Documentation

string KSPAssembly.name
int KSPAssembly.versionMajor
int KSPAssembly.versionMinor

The documentation for this class was generated from the following file: