Skip to content

ModInfo Scriptable Object and Publish

AALUND13 edited this page Nov 22, 2024 · 2 revisions

ModInfo Scriptable Object

The ModInfo scriptable object functions as an asset-based alternative to a manifest.json file. Here’s why you might prefer using ModInfo over manifest.json:

  • Integration with Unity Tools:
    ModInfo enables seamless publishing workflows directly from Unity.

Where to Create ModInfo

You can create a ModInfo scriptable object from:

  • Menu: Unity Rounds Modding Tools => Mod Info

Recommendation

Ensure that the fields in your ModInfo object match the entries in your manifest.json file to avoid inconsistencies during publishing.

Publish

The Publish option simplifies the process of packaging and preparing your mods for distribution. Here's how it works:

  1. Publishing Process:

    • Mods with a valid ModInfo scriptable object can be published.
    • The plugin will create a Publish folder by default, with a subfolder named after your mod.
  2. Generated Files:

    • A manifest.json file is created based on the fields you filled in your ModInfo object.
    • The following files are copied into the subfolder, if available:
      • icon.png
      • README.md
      • CHANGELOG.md
      • <YourMod>.dll
  3. Packaging:

    • The subfolder is zipped, creating a ready-to-distribute archive for your mod.
  4. Publish Folder Copy To (Optional):

    • If you have specified a Publish Folder Copy To location in the settings, the subfolder will automatically be copied to the specified folder.
    • This is especially useful for automating the placement of published mods into your mods plugin folder.

Clone this wiki locally