Table of Contents

Class ModInfo

Namespace
ModMenu
Assembly
ModMenu.dll

A class containing information about a mod, along with its registered configs.

ModInfo instances are returned by Register(BaseUnityPlugin).

When you Add a config to a ModInfo instance, it will be parsed and displayed within your mod's config page once ModView has built it.

public class ModInfo
Inheritance
ModInfo
Inherited Members

Fields

description

A description for this mod.

By default this will be the description set in the AssemblyDescriptionAttribute of the Assembly of your mod.

public string description

Field Value

string

license

This mod's license.

public string license

Field Value

string

theme

The Theme to apply to this mod's config page.

public Theme theme

Field Value

Theme

thumbnail

A texture to apply for the mod's thumbnail.

If thumbnailUrl is set, the texture set here will still be used anyway. The URL will be ignored.

public Texture2D thumbnail

Field Value

Texture2D

thumbnailUrl

A URL to download the mod's thumbnail from.

If thumbnail is set, it will be used instead of this.

public string thumbnailUrl

Field Value

string

Properties

name

The name of this mod. (read only)

This is the name set in the BepInPlugin attribute of your mod.

public string name { get; }

Property Value

string

onBuild

Invokes listeners with a ModView when this mod's config page is being built.

This allows you to apply some extra customisations before the page is fully created.

public BuildEvent onBuild { get; }

Property Value

BuildEvent

version

This mod's version. (read only)

This is the version set in the BepInPlugin attribute of your mod.

public Version version { get; }

Property Value

Version

Methods

Add(ConfigFile)

Adds a ConfigFile as a config.

This allows you to add an entire BepInEx ConfigFile at once. Note: you miss out on customisation, but this could help for simplicity.

public void Add(ConfigFile configFile)

Parameters

configFile ConfigFile

The ConfigFile to add

Add(object)

Adds a given object as a config.

This should be used for configs which have an instance (non static).

public void Add(object obj)

Parameters

obj object

The object to add

Add(Type)

Adds a given Type as a config.

This should be used for static configs.

public void Add(Type type)

Parameters

type Type

The type to add