Skip to content

Setting up the module

Mariusz Tang edited this page Jan 15, 2024 · 3 revisions

This page is more suited for people with experience in Unity. If you are using the template, the steps on this page have already been done for you, so feel free to skip.


In Unity, drag the TestHarness prefab from the TestHarness folder into the scene.

From the Hierarchy, create an empty GameObject and name it to match your module, then add KMBombInfo, KMAudio, KMBombModule, and KMSelectable components to it. Fill in the Module Type and Module Display Name fields of the KMBombModule to match the name of your module. You should also create a new script and assign add it as a component so you can customise the module.

image

Navigate to Assets > KMAssets > Models > Components, and drag the Component_PuzzleBackground prefab into your module object. Make sure its Position is 0, 0, 0, and set its Rotation to 0, 180, 0. Feel free to remove the attached Animator component.

image

Add the Component_Highlight prefab (in the same folder) to the module, making sure its Position and Rotation are both set to 0, 0, 0. Remove the attached Mesh Renderer, and add a KMHighlightable component, setting the Highlight Scale field to 1, 1, 1.

image

Add a Status Light Parent object to the module with a KMStatusLightParent component attached, and set its Position to 0.075167, 0.01986, 0.07605701.

image

I recommend keeping the three components we just added in another empty object inside the parent, for organization purposes.

image

Now, set the Highlight field in the module object's KMHighlightable component to the Component_Highlight's KMHighlightable component.

image

When you press play, a test bomb should appear, and the module should be highlightable. You will not be able to actually select the module until you have added a selectable button to it.

image

Finally, create a prefab out of the module object by dragging it from the Hierarchy into the Project tab.

This sidebar, as with the rest of the wiki, is a work in progress. If a link is missing, that means the relevant page has not been made yet, but is planned.

  • What's in the main script?
  • Extras
    • Grayscale background
    • Alternative component puzzle-background UV-mapping
    • Animated button component
    • Example modules

Uploading your mod

Clone this wiki locally