How to use the template - mariusz-tang/KTaNE-Module-Template GitHub Wiki
This section covers the contents of the template, and how it is intended to be used.
Note: I am using the naming conventions that I like to follow, making a module called "Module Name". You do not have to follow my/any naming conventions, but you should be consistent!
In the template folder
The template adds a _Module
folder which contains all of the included items:
- the
_Scripts
folder contains a template module script, and a premade animatable button script. - the
Animations
folder contains an animation controller to go along with the button script. - the
Materials
folder contains a greyscale material for making coloured backgrounds. - the
Textures
folder contains the texture used by the aforementioned material. - there is a
Module
scene file and a matching prefab file, a blank preview image, and aREADME
file which links to this guide.
Adding the template to your project
To install the template, open Unity and go to Keep Talking ModKit > Plugins
, then wait for the plugins manager to load—this may take a few minutes.
Click on Module Template (By Kuro)
, hit Install
, then close the Plugins tab once it's installed. You may need to click off of Unity to let it import the template.
Setting up the template
In the _Module
folder, rename both the Module
scene and prefab files to match the name of your module, and drag the scene into the Hierarchy. Remove the existing scene as you won't need it.
Click on the module in the Hierarchy, and edit the Module Type
and Module Display Name
fields to match the name of your module. The Module Type
is also known as the "module ID", and is what is needed by DMG to load the module. I recommend that it consists of alphanumeric characters only. The Module Display Name
is the name that will be displayed in-game on the Repository of Manual Pages.
Finally, in the _Scripts
folder, change the name of the ModuleModule.cs
file and the name of the class in that file to match the name of your module as shown:
// If the file was renamed to "ModuleNameModule.cs":
public class ModuleNameModule : MonoBehaviour {
The name of the class must match the file name exactly or Unity will not recognise it as a component.
The module object contains two children: Module Skeleton
and Module UI
. The former contains the module background, highlight, and status light parent. I recommend everything else goes in the latter, for organization purposes.