BepInDependency Class
Definition
Section titled “Definition”This attribute specifies any dependencies that this plugin has on other plugins.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]public class BepInDependency : Attribute, ICacheable
Inheritance object → Attribute
Implements ICacheable
Constructors
Section titled “Constructors”BepInDependency(string, DependencyFlags)
Section titled “BepInDependency(string, DependencyFlags)”Marks this BaseUnityPlugin as dependent on another plugin. The other plugin will be loaded before this one. If the other plugin doesn’t exist, what happens depends on the Flags parameter.
public BepInDependency(string DependencyGUID, BepInDependency.DependencyFlags Flags = DependencyFlags.HardDependency)
Parameters
Section titled “Parameters”DependencyGUID
string
The GUID of the referenced plugin.
Flags
BepInDependency.DependencyFlags
The flags associated with this dependency definition.
BepInDependency(string, string)
Section titled “BepInDependency(string, string)”Marks this BaseUnityPlugin as dependent on another plugin. The other plugin will be loaded before this one. If the other plugin doesn’t exist or is of a version not satisfying VersionRange, this plugin will not load and an error will be logged instead.
public BepInDependency(string guid, string version)
Parameters
Section titled “Parameters”guid
string
The GUID of the referenced plugin.
version
string
The version range of the referenced plugin.
Remarks
Section titled “Remarks”When version is supplied the dependency is always treated as HardDependency
Properties
Section titled “Properties”DependencyGUID
Section titled “DependencyGUID”The GUID of the referenced plugin.
public string DependencyGUID { get; protected set; }
The flags associated with this dependency definition.
public BepInDependency.DependencyFlags Flags { get; protected set; }
VersionRange
Section titled “VersionRange”The version SemVer.Range of the referenced plugin.
public Range VersionRange { get; protected set; }