-
Notifications
You must be signed in to change notification settings - Fork 2
Do This First
Neptune-Sky edited this page Nov 10, 2022
·
6 revisions
First off, you'll need to add UITools.dll
as a reference in your project. We recommend placing it somewhere in your project folder.
Next, you will need to tell the mod loader that UI Tools is a dependency for your mod. It has an override you can use to do this, and you should put this in your main class where you give it the rest of the information like mod name. Make sure you include the provided using.
using System.Collections.Generic;
namespace foo
{
public class Main : Mod
{
// Make sure you replace the version code with the minimum UI Tools version your mod requires.
public override Dictionary<string, string> Dependencies { get; } = new Dictionary<string, string> { { "UITools", "1.0" } };
}
}
This will make sure that your mod doesn't try to load without UI Tools installed and break things.
And that's about it! Now you can start using its functionality. Make sure to put using UITools;
at the top of any class file you want to use it in.