Installation
Adding CurseForge to a Unity project is an import, not a build. The SDK ships as Unity packages that you import into your project. There is no native code to compile, no engine change and no separate tool to install.
Two packages are involved. The Unity integration package is always required. The UI package is optional and adds a prebuilt in-game mod browser, a settings page in the Unity editor, and a demo scene your team can open to see the whole flow running.
Importing the packages does not change how your game behaves. Nothing runs until your code initializes the SDK, so the packages can sit in a project while your team plans the integration.
What you import
| Package | Required | What it adds |
|---|---|---|
| Unity integration | Yes | The core SDK libraries, the Unity integration source, and two bundled third-party libraries |
| UI package | No | The prebuilt mod browser prefab, the CFUnity wrapper, the settings page, and a samples package |
The UI package builds on the Unity integration, so import the integration first. Supported Unity versions are on Engine compatibility, and supported platforms are on Platform compatibility.
Get the SDK on GitHub.
How it works
- Import the Unity integration package through Assets > Import Package > Custom Package.
- If you want the prebuilt browser, import the UI package the same way.
- Reference the SDK assemblies from your own code. See Assemblies below.
- Optionally, import the samples. See Samples below.
What lands in your project
Everything installs under Assets/Plugins/CurseForge.
| Folder | Contents |
|---|---|
cfcore-csharp-unity | The Unity integration: the compiled core SDK libraries, the integration source, and the bundled libraries |
UI/Content | The browser prefab, the settings asset, the browser's layouts, styles, fonts and panel settings |
UI/Scripts | The browser and wrapper source, split into runtime and editor folders |
UI/Documentation | Reference notes shipped with the UI package |
Samples | The demo scene and sample scripts, once you import the samples package |
Inside cfcore-csharp-unity, the integration source is in runtime and the bundled libraries are in vendor. The settings asset is UI/Content/CurseForgeSettings.asset. If you move the CurseForge folder, the CurseForge Settings page in Project Settings still finds the asset wherever it is. If no settings asset exists anywhere in the project, the page creates one at its original path.
Assemblies
The SDK compiles into three assemblies of its own, alongside the precompiled core libraries.
| Assembly | Auto-referenced | What it contains |
|---|---|---|
CFCore.Unity | No | BootstrapUnity and the Unity networking, file and logging services |
CurseForge.UI | Yes | The CFUnity wrapper, its services and the browser component |
CurseForge.UI.Editor | Yes, in the editor only | The CurseForge Settings page in Project Settings |
What your code needs depends on the entry point you use:
| You call | What to reference |
|---|---|
CFUnity or the prebuilt browser | Nothing. Scripts in Unity's default assembly can use them and the core SDK types directly, as the samples do |
The core API through BootstrapUnity | Put the calling script in an assembly definition that references CFCore.Unity |
Because CFCore.Unity is not auto-referenced, a script in Unity's default assembly that calls BootstrapUnity.Create does not compile. Move the script into an assembly definition of your own and add CFCore.Unity to its references.
Bundled libraries
The Unity integration ships two third-party libraries in its vendor folder, which the core SDK depends on:
| Library | File |
|---|---|
| Newtonsoft Json | Newtonsoft.Json.dll |
| SharpZipLib | Unity.SharpZipLib.dll |
The integration folder also contains a linker file named link.xm_, which lists types to preserve from code stripping.
Samples
The UI package contains Samples.unitypackage in its UI folder. Import it the same way as the other packages to get a working reference integration in Assets/Plugins/CurseForge/Samples.
| File | What it shows |
|---|---|
CurseForgeDemoScene.unity | A game menu with a button that opens the browser |
CFSampleController.cs | Initializing the browser with a sign-in token, and opening it |
CFUIInput.cs | Passing keyboard and controller input to the browser for navigation |
CFUIInputGlyphs.cs | Switching the browser's button prompts when the player changes input device. See below |
CFUIInputGlyphs.cs recognizes keyboard, PlayStation, Xbox, Nintendo Switch and generic controllers. The UI package ships button prompts for keyboard, PlayStation and Xbox only. In the demo scene, generic controllers use the Xbox prompts and Nintendo Switch controllers have none.
CFUIInput.cs and CFUIInputGlyphs.cs use Unity's Input System package, and the demo scene uses both scripts. Install the Input System package before importing the samples.
The sample controller signs in with a provider and token set in the Inspector. Replace those with your platform's real sign-in before shipping anything based on it. See Authentication.
Post-install checklist
| Check | How to confirm |
|---|---|
| Both folders are in place | The CurseForge folder holds the integration folder, plus the UI folder if you imported the UI package |
| The project compiles | No compile errors in the Console after the import finishes |
| The settings page exists | Project Settings lists CurseForge Settings, if you imported the UI package |
| Your code can reach the SDK | The script that creates the SDK instance lives in an assembly definition that references CFCore.Unity |
Next steps
The SDK does nothing until you initialize it. Next, configure the settings and bring the SDK up: see Initialization and settings.
For SDK access, Nintendo Switch integration, or installation problems, contact cfforstudios@overwolf.com.