Repository navigation
Your first mod
So, you want to create your first mod. What you have to do?
First of all, it'd be better if you will have opened our wiki and Unity Manual
Then you can create folder with your mod and go to "manually" section
Now, you can start creating mod.
So you've already created a folder where your mod will be stored, right? Now you need 3 main files:
- Metafile
- C# scripts
- Image
Metafile is for compiler. It stores name of author, version and so on.
More about ModData.
C# Scripts in metafile are that scripts, that game compiles.
Image is for thumbnail. Other images can be loaded through code.
So, lets start.
First of all, we need to use libraries.
using UnityEngine;Then, we need to define a class...
public class YourMod : MonoBehaviour
{
}...and define Main() function.
public static void Main()
{
}In total, we have this:
using UnityEngine;
public class TemplateMod : MonoBehaviour
{
public static void Main()
{
}
}It's pretty simple. Just use AddConnection from Utility
It is as you wish, everything is in your hands! But, there is example:
output = Utility.AddConnection(//что-нибудь)
output.OnValueChanged += () =>
{
//код
}Use of connection points you can in Connection System.
Create script, and use AddComponent<YourScript>();