Skip to main content

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​

PackageRequiredWhat it adds
Unity integrationYesThe core SDK libraries, the Unity integration source, and two bundled third-party libraries
UI packageNoThe 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

  1. Import the Unity integration package through Assets > Import Package > Custom Package.
  2. If you want the prebuilt browser, import the UI package the same way.
  3. Reference the SDK assemblies from your own code. See Assemblies below.
  4. Optionally, import the samples. See Samples below.

What lands in your project​

Everything installs under Assets/Plugins/CurseForge.

FolderContents
cfcore-csharp-unityThe Unity integration: the compiled core SDK libraries, the integration source, and the bundled libraries
UI/ContentThe browser prefab, the settings asset, the browser's layouts, styles, fonts and panel settings
UI/ScriptsThe browser and wrapper source, split into runtime and editor folders
UI/DocumentationReference notes shipped with the UI package
SamplesThe 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.

AssemblyAuto-referencedWhat it contains
CFCore.UnityNoBootstrapUnity and the Unity networking, file and logging services
CurseForge.UIYesThe CFUnity wrapper, its services and the browser component
CurseForge.UI.EditorYes, in the editor onlyThe CurseForge Settings page in Project Settings

What your code needs depends on the entry point you use:

You callWhat to reference
CFUnity or the prebuilt browserNothing. Scripts in Unity's default assembly can use them and the core SDK types directly, as the samples do
The core API through BootstrapUnityPut the calling script in an assembly definition that references CFCore.Unity
warning

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:

LibraryFile
Newtonsoft JsonNewtonsoft.Json.dll
SharpZipLibUnity.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.

FileWhat it shows
CurseForgeDemoScene.unityA game menu with a button that opens the browser
CFSampleController.csInitializing the browser with a sign-in token, and opening it
CFUIInput.csPassing keyboard and controller input to the browser for navigation
CFUIInputGlyphs.csSwitching 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.

info

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​

CheckHow to confirm
Both folders are in placeThe CurseForge folder holds the integration folder, plus the UI folder if you imported the UI package
The project compilesNo compile errors in the Console after the import finishes
The settings page existsProject Settings lists CurseForge Settings, if you imported the UI package
Your code can reach the SDKThe 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.