BepInEx Base type of all classes representing and enforcing acceptable values of config settings. Type of values that this class can Clamp. Change the value to be acceptable, if it's not already. Check if the value is an acceptable value. Type of the supported values. Get the string for use in config files. Specify the list of acceptable values for a setting. List of values that a setting can take. Specify the list of acceptable values for a setting. If the setting does not equal any of the values, it will be set to the first one. Specify the range of acceptable values for a setting. Lowest acceptable value Highest acceptable value Lowest acceptable value Highest acceptable value Provides access to a single setting inside of a . Type of the setting. Fired when the setting is changed. Does not detect changes made outside from this object. Value of this setting. Container for a single setting of a . Each config entry is linked to one config file. Types of defaultValue and definition.AcceptableValues have to be the same as settingType. Config file this entry is a part of. Category and name of this setting. Used as a unique key for identification within a . Description / metadata of this setting. Type of the that this setting holds. Default value of this setting (set only if the setting was not changed before). Get or set the value of the setting. Get the serialized representation of the value. Set the value by using its serialized form. If necessary, clamp the value to acceptable value range. T has to be equal to settingType. Trigger setting changed event. Write a description of this setting using all available metadata. Section and key of a setting. Used as a unique key for identification within a . The same definition can be used in multiple config files, it will point to different settings then. Group of the setting. All settings within a config file are grouped by this. Name of the setting. Create a new definition. Definitions with same section and key are equal. Group of the setting, case sensitive. Name of the setting, case sensitive. Check if the definitions are the same. Check if the definitions are the same. Check if the definitions are the same. Check if the definitions are the same. Metadata of a . Create a new description. Text describing the function of the setting and any notes or warnings. Range of values that this setting can take. The setting's value will be automatically clamped. Objects that can be used by user-made classes to add functionality. Text describing the function of the setting and any notes or warnings. Range of acceptable values for a setting. Objects that can be used by user-made classes to add functionality. An empty description. A helper class to handle persistent data. All public methods are thread-safe. All config entries inside Create a list with all config entries inside of this config file. Create an array with all config entries inside of this config file. Should be only used for metadata purposes. If you want to access and modify an existing setting then use instead with no description. Full path to the config file. The file might not exist until a setting is added and changed, or is called. If enabled, writes the config to disk every time a value is set. If disabled, you have to manually use or the changes will be lost! Create a new config file at the specified config path. Full path to a file that contains settings. The file will be created as needed. If the config file/directory doesn't exist, create it immediately. Information about the plugin that owns this setting file. Reloads the config from disk. Unsaved changes are lost. Writes the config to disk. Access one of the existing settings. If the setting has not been added yet, null is returned. If the setting exists but has a different type than T, an exception is thrown. New settings should be added with . Type of the value contained in this setting. Section and Key of the setting. Access one of the existing settings. If the setting has not been added yet, null is returned. If the setting exists but has a different type than T, an exception is thrown. New settings should be added with . Type of the value contained in this setting. Section/category/group of the setting. Settings are grouped by this. Name of the setting. Access one of the existing settings. If the setting has not been added yet, false is returned. Otherwise, true. If the setting exists but has a different type than T, an exception is thrown. New settings should be added with . Type of the value contained in this setting. Section and Key of the setting. The ConfigEntry value to return. Access one of the existing settings. If the setting has not been added yet, null is returned. If the setting exists but has a different type than T, an exception is thrown. New settings should be added with . Type of the value contained in this setting. Section/category/group of the setting. Settings are grouped by this. Name of the setting. The ConfigEntry value to return. Create a new setting. The setting is saved to drive and loaded automatically. Each definition can be used to add only one setting, trying to add a second setting will throw an exception. Type of the value contained in this setting. Section and Key of the setting. Value of the setting if the setting was not created yet. Description of the setting shown to the user and other metadata. Create a new setting. The setting is saved to drive and loaded automatically. Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. Type of the value contained in this setting. Section/category/group of the setting. Settings are grouped by this. Name of the setting. Value of the setting if the setting was not created yet. Description of the setting shown to the user and other metadata. Create a new setting. The setting is saved to drive and loaded automatically. Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. Type of the value contained in this setting. Section/category/group of the setting. Settings are grouped by this. Name of the setting. Value of the setting if the setting was not created yet. Simple description of the setting shown to the user. Create a new setting. The setting is saved to drive and loaded automatically. Each definition can be used to add only one setting, trying to add a second setting will throw an exception. Type of the value contained in this setting. Section and Key of the setting. Value of the setting if the setting was not created yet. Description of the setting shown to the user and other metadata. Create a new setting. The setting is saved to drive and loaded automatically. Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. Type of the value contained in this setting. Section/category/group of the setting. Settings are grouped by this. Name of the setting. Value of the setting if the setting was not created yet. Description of the setting shown to the user and other metadata. Create a new setting. The setting is saved to drive and loaded automatically. Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. Type of the value contained in this setting. Section/category/group of the setting. Settings are grouped by this. Name of the setting. Value of the setting if the setting was not created yet. Simple description of the setting shown to the user. Access a setting. Use Bind instead. Access a setting. Use Bind instead. An event that is fired every time the config is reloaded. Fired when one of the settings is changed. Returns the ConfigDefinitions that the ConfigFile contains. Creates a new array when the property is accessed. Thread-safe. Returns the ConfigEntryBase values that the ConfigFile contains. Creates a new array when the property is accessed. Thread-safe. Provides access to a single setting inside of a . Type of the setting. Entry of this setting in the . Unique definition of this setting. Config file this setting is inside of. Fired when the setting is changed. Does not detect changes made outside from this object. Value of this setting. A keyboard shortcut that can be used in Update method to check if user presses a key combo. The shortcut is only triggered when the user presses the exact combination. For example, F + LeftCtrl will trigger only if user presses and holds only LeftCtrl, and then presses F. If any other keys are pressed, the shortcut will not trigger. Can be used as a value of a setting in to allow user to change this shortcut and have the changes saved. How to use: Use in this class instead of in the Update loop. Shortcut that never triggers. All KeyCode values that can be used in a keyboard shortcut. Create a new keyboard shortcut. Main key to press Keys that should be held down before main key is registered Main key of the key combination. It has to be pressed / let go last for the combination to be triggered. If the combination is empty, is returned. Modifiers of the key combination, if any. Attempt to deserialize key combination from the string. Serialize the key combination into a user readable string. Check if the main key was just pressed (Input.GetKeyDown), and specified modifier keys are all pressed Check if the main key is currently held down (Input.GetKey), and specified modifier keys are all pressed Check if the main key was just lifted (Input.GetKeyUp), and specified modifier keys are all pressed. Arguments for events concerning a change of a setting. Setting that was changed Serializer/deserializer used by the config system. Convert object of a given type to a string using available converters. Convert string to an object of a given type using available converters. Convert string to an object of a given type using available converters. Get a converter for a given type if there is any. Add a new type converter for a given type. If a different converter is already added, this call is ignored and false is returned. Check if a given type can be converted to and from string. Give a list of types with registered converters. For types that are in assemblies that can't get loaded before preloader runs (or it won't work on these assemblies) A serializer/deserializer combo for some type(s). Used by the config system. Used to serialize the type into a (hopefully) human-readable string. Object is the instance to serialize, Type is the object's type. Used to deserialize the type from a string. String is the data to deserialize, Type is the object's type, should return instance to an object of Type. True if an external console has been started, false otherwise. The stream that writes to the standard out stream of the process. Should never be null. The stream that writes to an external console. Null if no such console exists Data class that represents information about a loadable BepInEx plugin. Contains all metadata and additional info required for plugin loading by . General metadata about a plugin. Collection of attributes that describe what processes the plugin can run on. Collection of attributes that describe what plugins this plugin depends on. Collection of attributes that describe what plugins this plugin is incompatible with. File path to the plugin DLL Instance of the plugin that represents this info. NULL if no plugin is instantiated from info (yet) This attribute denotes that a class is a plugin, and specifies the required metadata. The unique identifier of the plugin. Should not change between plugin versions. The user friendly name of the plugin. Is able to be changed between versions. The specfic version of the plugin. The unique identifier of the plugin. Should not change between plugin versions. The user friendly name of the plugin. Is able to be changed between versions. The specfic version of the plugin. This attribute specifies any dependencies that this plugin has on other plugins. Flags that are applied to a dependency The plugin has a hard dependency on the referenced plugin, and will not run without it. This plugin has a soft dependency on the referenced plugin, and is able to run without it. The GUID of the referenced plugin. The flags associated with this dependency definition. The minimum version of the referenced plugin. Marks this as depenant on another plugin. The other plugin will be loaded before this one. If the other plugin doesn't exist, what happens depends on the parameter. The GUID of the referenced plugin. The flags associated with this dependency definition. Marks this as depenant on another plugin. The other plugin will be loaded before this one. If the other plugin doesn't exist or is of a version below , this plugin will not load and an error will be logged instead. The GUID of the referenced plugin. The minimum version of the referenced plugin. When version is supplied the dependency is always treated as HardDependency This attribute specifies other plugins that are incompatible with this plugin. The GUID of the referenced plugin. Marks this as incompatible with another plugin. If the other plugin exists, this plugin will not be loaded and a warning will be shown. The GUID of the referenced plugin. This attribute specifies which processes this plugin should be run for. Not specifying this attribute will load the plugin under every process. The name of the process that this plugin will run under. The name of the process that this plugin will run under. Helper class to use for retrieving metadata about a plugin, defined as attributes. Retrieves the BepInPlugin metadata from a plugin type. The plugin type. The BepInPlugin metadata of the plugin type. Retrieves the BepInPlugin metadata from a plugin instance. The plugin instance. The BepInPlugin metadata of the plugin instance. Gets the specified attributes of a type, if they exist. The attribute type to retrieve. The plugin type. The attributes of the type, if existing. Gets the specified attributes of an instance, if they exist. The attribute type to retrieve. The plugin instance. The attributes of the instance, if existing. Retrieves the dependencies of the specified plugin type. The plugin type. A list of all plugin types that the specified plugin type depends upon. This class is appended to AssemblyInfo.cs when BepInEx is built via a CI pipeline. It is mainly intended to signify that the current build is not a release build and is special, like for instance a bleeding edge build. The manager and loader for all plugins, and the entry point for BepInEx plugin system. The loaded and initialized list of plugins. List of all loaded via the chainloader. Collection of error chainloader messages that occured during plugin loading. Contains information about what certain plugins were not loaded. The GameObject that all plugins are attached to as components. Initializes BepInEx to be able to start the chainloader. Analyzes the given type definition and attempts to convert it to a valid Type definition to analyze. If the type represent a valid plugin, returns a instance. Otherwise, return null. The entrypoint for the BepInEx plugin system. A cacheable metadata item. Can be used with and to cache plugin metadata. Serialize the object into a binary format. Loads the object from binary format. A cached assembly. List of cached items inside the assembly. Timestamp of the assembly. Used to check the age of the cache. Provides methods for loading specified types from an assembly. Default assembly resolved used by the Default reader parameters used by Event fired when fails to resolve a type during type loading. Looks up assemblies in the given directory and locates all types that can be loaded and collects their metadata. The specific base type to search for. The directory to search for assemblies. A function to check if a type should be selected and to build the type metadata. A filter function to quickly determine if the assembly can be loaded. The name of the cache to get cached types from. A dictionary of all assemblies in the directory and the list of type metadatas of types that match the selector. Loads an index of type metadatas from a cache. Name of the cache Cacheable item Cached type metadatas indexed by the path of the assembly that defines the type. If no cache is defined, return null. Saves indexed type metadata into a cache. Name of the cache List of plugin metadatas indexed by the path to the assembly that contains the types Cacheable item Converts TypeLoadException to a readable string. TypeLoadException Readable representation of the exception The base plugin type that is used by the BepInEx plugin loader. Information about this plugin as it was loaded. Logger instance tied to this plugin. Default config file tied to this plugin. The config file will not be created until any settings are added and changed, or is called. Create a new instance of a plugin and all of its tied in objects. BepInPlugin attribute is missing. Logs entries using Unity specific outputs. Log levels to display. Writer for the disk log. Timer for flushing the logs to a file. Whether to write Unity log messages to disk log. Creates a new disk log listener. Path to the log. Log levels to display. Whether to append logs to an already existing log file. Whether to include Unity log into the disk log. Disposes of Disk logger Log event arguments. Contains info about the log message. Logged data. Log levels for the data. Log source that emitted the log event. Creates the log event args- Logged data. Log level of the data. Log source that emits these args. Like but appends newline at the end. Same output as but with new line. A static Logger instance. Collection of all log listeners that receive log events. Collection of all log source that output log events. Logs an entry to the current logger instance. The level of the entry. The textual value of the entry. Creates a new log source with a name and attaches it to log sources. Name of the log source to create. An instance of that allows to write logs. The level, or severity of a log entry. No level selected. A fatal error has occurred, which cannot be recovered from. An error has occured, but can be recovered from. A warning has been produced, but does not necessarily mean that something wrong has happened. An important message that should be displayed to the user. A message of low importance. A message that would likely only interest a developer. All log levels. Helper methods for log level handling. Gets the highest log level when there could potentially be multiple levels provided. The log level(s). The highest log level supplied. Returns a translation of a log level to it's associated console colour. The log level(s). A console color associated with the highest log level supplied. A generic log listener that receives log events and can route them to some output (e.g. file, console, socket). Handle an incoming log event. Log source that sent the event. Don't use; instead use Information about the log message. Log source that can output log messages. Name of the log source. Event that sends the log message. Call to send a log message. A generic, multi-purpose log source. Exposes simple API to manually emit logs. Creates a manual log source. Name of the log source. Logs a message with the specified log level. Log levels to attach to the message. Multiple can be used with bitwise ORing. Data to log. Logs a message with level. Data to log. Logs a message with level. Data to log. Logs a message with level. Data to log. Logs a message with level. Data to log. Logs a message with level. Data to log. Logs a message with level. Data to log. A source that routes all logs from API to BepInEx logger. Whether Trace logs are rerouted. Creates a new trace log source. New log source (or already existing one). Internal log source. Creates a new trace log source. Writes a message to the underlying instance. The message to write. Writes a message and a newline to the underlying instance. The message to write. Logs entries using Unity specific outputs. Logs entries using Unity specific outputs. Logs entries using Unity specific outputs. Creates a new Unity log source. Paths used by BepInEx List of directories from where Mono will search assemblies before assembly resolving is invoked. The directory that the core BepInEx DLLs reside in. The path to the core BepInEx DLL. The path to the main BepInEx folder. The path of the currently executing program BepInEx is encapsulated in. The directory that the currently executing process resides in. On OSX however, this is the parent directory of the game.app folder. The path to the Managed folder of the currently running Unity game. The path to the config directory. The path to the global BepInEx configuration file. The path to temporary cache files. The path to the patcher plugin folder which resides in the BepInEx folder. The path to the plugin folder which resides in the BepInEx folder. This is ONLY guaranteed to be set correctly when Chainloader has been initialized. The name of the currently executing process. Provides methods for running code on other threads and synchronizing with the main thread. Current instance of the helper. Gives methods for invoking delegates on the main unity thread, both synchronously and asynchronously. Can be used in many built-in framework types, for example and to make their events fire on the main unity thread. Queue the delegate to be invoked on the main unity thread. Use to synchronize your threads. Queue the delegate to be invoked on a background thread. Use this to run slow tasks without affecting the game. NOTE: Most of Unity API can not be accessed while running on another thread! Task to be executed on another thread. Can optionally return an Action that will be executed on the main thread. You can use this action to return results of your work safely. Return null if this is not needed. False if current code is executing on the main unity thread, otherwise True. Warning: Will return true before the first frame finishes (i.e. inside plugin Awake and Start methods). Convenience extensions for utilizing multiple threads and using the . Apply a function to a collection of data by spreading the work on multiple threads. Outputs of the functions are returned to the current thread and yielded one by one. Type of the input values. Type of the output values. Input values for the work function. Function to apply to the data on multiple threads at once. Number of worker threads. By default SystemInfo.processorCount is used. An exception was thrown inside one of the threads, and the operation was aborted. Need at least 1 workerCount. Generic helper properties and methods. Whether current Common Language Runtime supports dynamic method generation using namespace. An encoding for UTF-8 which does not emit a byte order mark (BOM). Try to perform an action. Action to perform. Possible exception that gets returned. True, if action succeeded, false if an exception occured. Combines multiple paths together, as the specific method is not available in .NET 3.5. The multiple paths to combine together. A combined path. Returns the parent directory of a path, optionally specifying the amount of levels. The path to get the parent directory of. The amount of levels to traverse. Defaults to 1 The parent directory. Tries to parse a bool, with a default value if unable to parse. The string to parse The value to return if parsing is unsuccessful. Boolean value of input if able to be parsed, otherwise default value. Converts a file path into a UnityEngine.WWW format. The file path to convert. A converted file path. Indicates whether a specified string is null, empty, or consists only of white-space characters. The string to test. True if the value parameter is null or empty, or if value consists exclusively of white-space characters. Sorts a given dependency graph using a direct toposort, reporting possible cyclic dependencies. Nodes to sort Function that maps a node to a collection of its dependencies. Type of the node in a dependency graph. Collection of nodes sorted in the order of least dependencies to the most. Thrown when a cyclic dependency occurs. Checks whether a given cecil type definition is a subtype of a provided type. Cecil type definition Type to check against Whether the given cecil type is a subtype of the type. Try to resolve and load the given assembly DLL. Name of the assembly, of the type . Directory to search the assembly from. The loaded assembly. True, if the assembly was found and loaded. Otherwise, false. Try to resolve and load the given assembly DLL. Name of the assembly, of the type . Directory to search the assembly from. Reader parameters that contain possible custom assembly resolver. The loaded assembly. True, if the assembly was found and loaded. Otherwise, false. Tries to create a file with the given name Path of the file to create File open mode Resulting filestream File access options File share options Try to parse given string as an assembly name Fully qualified assembly name Resulting instance true, if parsing was successful, otherwise false On some versions of mono, using fails because it runs on unmanaged side which has problems with encoding. Using solves this by doing parsing on managed side instead. Gets unique files in all given directories. If the file with the same name exists in multiple directories, only the first occurrence is returned. Directories to search from. File pattern to search. Collection of all files in the directories. Console class with safe handlers for Unity 4.x, which does not have a proper Console implementation