适用于 Unity 和 Unity 游戏的模块项目开发环境
Join the ThunderKit Discord Server to get help and interact with other ThunderKit users.
Welcome and thank you for your interest in ThunderKit. ThunderKit is a Unity extension that provides an expansive and expandable environment for mod development.
ThunderKit can help you develop multiple mods in a single project and streamline your building and testing efforts through automation. Aiming to help you waste less time copying files, managing collections of mods, and acquiring dependencies, so that you can focus on your mods and test them under many different configurations and combinations easily.
Below is a quick overview of how to get started using ThunderKit, showing you the basic parts and pieces you will need to get together to get started making cool stuff!
ThunderKit comes with a template for a simple BepInEx setup that will help you get straight to modding if the game you're modding can use this it.
These initial steps are the universal basic setup for any ThunderKit project.
Install Unity
Install Git Client
Create a new Unity Project with the installed version of Unity
Install ThunderKit There are two ways of installing thunderkit, either manually editing the projects manifest.json or by using the Unity Package Manager
"com.passivepicasso.thunderkit":"https://github.com/PassivePicasso/ThunderKit.git", ,, { and }https://github.com/PassivePicasso/ThunderKit.git#Tag
replacing Tag tag name for the releasehttps://github.com/PassivePicasso/ThunderKit.git#5.2.3https://github.com/PassivePicasso/ThunderKit.gitVerify that the ThunderKit Settings window opened automatically.
Click on Browse under the ThunderKit settings to locate and select the games executable
Configure the import process to your liking.
Hit Import
Open the project window from the main menu via Windows/General/Project
Create a Manifest by right clicking in any folder under assets and selecting ThunderKit/Manifest
From this point forward you will need to understand some facets of mod developing in Unity and ThunderKit, these sections will cover those aspects. What you will need to do will vary depending on your projects.
If you're using Thunderstore, check the Thunderstore community for the game for a ThunderKit template. Users of ThunderKit are encouraged to build and share reusable templates that define standard Pipelines for building mods for games and even specialized toolkits to allow more Unity Editor functionality for modding games.
Each ManifestDatum on a Manifest will have a StagingPaths array. This is where you will indicate to ThunderKit where to deploy your assets. Paths are relative to the project's root folder unless an absolute path is manually specified. Each entry will be a destination, so if you need to output assemblies or AssetBundles to multiple places, you can add multiple paths.
You can create PathReferences by using the project window context menu ThunderKit/PathReference menu item.
Use PathReferences to identify resuable common paths. A PathReference can be referenced in StagingPaths by using arrow brackets.
For example
``
ThunderKit includes a number of PathReferences already.
It is recommended to manage code for mod projects inside your ThunderKit project. However there are a few things you need to do in order to get your project setup.
In order to deploy any code you create, you will need an AssemblyDefinition. To create an AssemblyDefinition, right click a folder in your project and navigate to Create/AssemblyDefinition
Any scripts placed in or under a folder containing an AssemblyDefinition will be included in an assembly with the same name as the AssemblyDefinition.
To include these Assemblies in your mod project, you will need to add an AssemblyDefinitions component to your Manifest.
Create or select your Manifest and click on Add Manifest Datum.
Double Click on AssemblyDefinitions to add it.
Under the Assembly Definitions component add an element to Definitions, then drag and drop the AssemblyDefinition into the open field.
Finally specify the output path(s) for the assemblies under Staging Paths.
To deploy assemblies managed by a Manifest you will need a Pipeline with the Stage Assemblies PipelineJob attached.
Create a Pipeline from the project window context menu, ThunderKit/Pipeline
Drag and drop your Manifest into the open Manifest field on the Pipeline.
Click on Add Pipeline Job
Find and Double Click on Stage Assemblies
Now the Assemblies referenced in your Manifest will be deployed by the Pipeline to the paths specified in the Manifest's AssemblyDefinition's Staging Paths array.
To deploy assets with your mod you may need to package them into AssetBundles. ThunderKit provides the AssetBundleDefs ManifestDatum for Manifests and the StageAssetBundles PipelineJob for Pipelines.
Find and add an AssetBundleDefs to your Manifest
Add an element to the AssetBundles array
Name your AssetBundle, make sure this will be a unique name, unity can only load 1 bundle with a given name at a time.
Add assets to the Assets array of the bundle.
Finally specify the output path(s) for the AssetBundles under Staging Paths.
The PipelineJob StageAssetBundles can be used to deploy AssetBundles defined by AssetBundleDefs. The StageAssetBundles PipelineJob has a Bundle Artifact Path field, this defaults to ``
This is a pre-staging are for AssetBundles to prevent unnecessarily rebuilding asset bundles, minimizing your build times. This can be left on the default value.
The Simulate field will execute an analysis of the AssetBundles and report in the Console what will be included in each bundle, this is a minimal solution and in the future a UI that reports this information will be made available.
If you don't have a Pipeline, create a Pipeline from the project window context menu, ThunderKit/Pipeline
If a Manifest isn't assigned to your Pipeline, Drag and drop your Manifest into the open Manifest field on the Pipeline.
Find and add the StageAssetBundles PipelineJob to your Pipeline
Your Pipeline will now stage AssetBundles during its next run, it will build out the AssetBundles to `` and then copy them to each Staging Path specified in the AssetBundleDefs StagingPaths array.
If you need to create asset libraries that other developers need to depend on, use UnityPackages to simplify that process. UnityPackages is ThunderKit tooling for Unity Manual - Asset Packages
UnityPackages can be used to setup asset lists that can be built out to a Unity Asset Package. A Unity AssetPackage allows assets to be easily imported into other Unity projects.
Unity AssetPackages have an issue where assets in them will not work in other projects if the Source code is not included with them. ThunderKit provides the ability to repair the mapping on these assets to allow you to distribute them with compiled assemblies instead.
To use UnityPackages to create redistributable AssetPackages follow these steps.
Find and Add a UnityPackages ManifestDatum to your Manifest
Create a UnityPackage using the project window context menu, ThunderKit/UnityPackage
Add assets to the Asset Files array by adding assets individually or by dragging and dropping assets.
Find and Add a StageUnityPackages PipelineJob to your Pipeline
Finally, make sure you've assigned paths to the UnityPackages StagingPaths on your Manifest
暂无开放 Issues,或尚未同步最近议题。