Skip to main content

API Reference

This is the API Reference:


It's an in-game, auto-generated, fully-interactable documentation of everything you can use in your ModScripts, right where you need it. Pretty cool.

In the leftmost column, you'll see all the MemeItems in the game that you can retrieve in your ModScripts.

In the column just to the right of it, you'll see the hierarchy of parent & child GameObjects that the selected MemeItem consists of.

Then in the colmun next to that, you'll see all the Components attached to the selected GameObject.

Then the last column shows all the member variables (fields and properties), methods, and events on the selected Component.

And all the way on the right, you have the member info section.

Member Info Section

This section shows you everything you need to know about the selected member, and how you can use it in your ModScripts.

This is where a little C# knowledge might come in handy.

Fields

Fields are simplest kind of member, and the info section will just show the type of the field. That is all.

Properties

A property is like a field, except it also specifies if you're allowed to just read it, or if you can also write to it. This is shown by the Get and Set labels. Properties with just Get means you can only read it.

Methods

A method is a function on a Component that you can invoke. The info section will show you the parameters it takes as input, and the return type of the output.

Events

An event is a special kind of member that you can subscribe to in your ModScript, and then you create an event handler that is called whenever the event gets triggered.

The info section for an event shows you the type of the event (which you don't really need to care about), and the parameters your event handler function needs to take as input.

For your convenience, it also shows you more information about the second parameter of your event handler, since this is what you'll actually be using to access information passed by the event.


More information about events can be found here.

Detailed Type Info

You may have noticed that some types in the info section are underlined with a darker shade of blue. This means you can click on it to see more detailed information about that type.

Auto-generated Example

Every member you select in the API reference also has an auto-generated example that you can copy and paste as a starting point.

The example will usually just be code to print out the member's value to the console, so it's not really useful as an actual complete ModScript, but it helps give you boilerplate code to start with.

As you can also see, there are sometimes some useful buttons to open the relevant Unity documentation for the selected thing.

note

The API reference is completely auto-generated and some stuff might be wrong, especially in the auto-generated example, so don't take it as gospel.