YAPYAP Font API
A lightweight library that allows modders to replace the YAPYAP game font across both UI and in-world text.
It automatically handles:
- UI text (TextMeshProUGUI)
- 3D world text (TextMeshPro)
No manual component patching required.
FEATURES
- Automatic font replacement for UI and 3D text
- Centralized font control via API
- Compatible with AssetBundle-loaded TMP Font Assets
- Clean integration with BepInEx-based mods
- No support for raw .ttf loading at runtime (Unity limitation)
How to Use (For Modders)
1. Reference the DLL
Add:
Jettcodey.FontAPI.dll
to your C# project references.
2. Declare Dependency
Add this attribute to your BaseUnityPlugin class:
[BepInDependency("Jettcodey.FontAPI")]
3. Load & Set the Font
- Load your custom AssetBundle
- Retrieve the TMP Font Asset
- Pass the font asset to the API for registration
The library will handle applying it to both UI and world text automatically.
Creating the AssetBundle
The game cannot load raw .ttf or .otf files directly. You must create a TextMeshPro Font Asset in Unity. Use the exact same Unity version as the game. For YAPYAP it is v6000.0.x. Using a different version may cause bundle incompatibility.- Import the Font: Drag your .ttf or .otf file into Unity.
- Create TMP Font Asset: Right-click the font file: Create → TextMeshPro → Font Asset
- Recommended Settings
- Character Set: Unicode Range (Hex)
- Atlas Population Mode: Dynamic (Recommended)
- Atlas Render Mode: SDF or SDFAA
- These settings ensure flexibility and proper scaling.
- Recommended Settings
- Build the AssetBundle:
- Assign the generated TMP SDF Font Asset to an AssetBundle (e.g., myfontbundle)
- Build the AssetBundle
- Load it in your mod and register the font through the API
Code example for a mod that uses YAPYAP Font API:
using BepInEx;
using UnityEngine;
using Jettcodey.FontAPI;
[BepInPlugin("myname.coolfont", "My Cool Font", "1.0.0")]
[BepInDependency("Jettcodey.FontAPI")]
public class MyFontMod : BaseUnityPlugin
{
public static MyFontMod Instance { get; private set; }
internal static new ManualLogSource? Logger { get; private set; }
private Harmony _harmony;
private void Awake()
{
Instance = this;
_Logger = base.Logger;
// 1. Load your AssetBundle
string pluginDir = Path.GetDirectoryName(Info.Location);
string path = Path.Combine(pluginDir, "myfontbundle");
AssetBundle bundle = AssetBundle.LoadFromFile(path);
if (bundle == null)
{
Logger.LogError("Failed to load bundle!");
return;
}
// 2. Register the font
// IMPORTANT: Use the name of the "SDF" Asset, not the .ttf file
FontAPI.LoadAndSet(bundle, "MyCoolFont SDF");
Logger.LogInfo("Font replaced!");
}
}
Requires: BepInEx 5
Made by: Jettcodey
How to Install
- Install BepInEx if it is not yet installed.
- Download and unzip YAPYAP Font API to YAPYAP\BepInEx\plugins
If you have any problems installing this or any other mod for YAPYAP, read this guide.

