# Create your first visual prefab patch

This walkthrough changes a stock prefab in the Unity Inspector and produces a distributable patch manifest.

## Before you start

You need:

* a Redux mod project with the Redux SDK
* ThunderKit configured for your KSP2/Redux installation
* a Redux SDK `Mod` asset with a valid mod ID and an all-assets Addressables group
* the external Addressables catalog available to the project

If the linked-asset browser cannot load its catalog, follow [Set up the source catalog](/doc/set-up-the-source-catalog-Car7ARcqhN) in the linked Addressables guide first.

## 1. Link the stock prefab

Open **Modding → Linked Addressables → Open Browser…**.

Search for the prefab by address, label, or type. You can use `t:GameObject` to show only prefab-like GameObject entries. Select the entry, choose an output folder under `Assets`, and click **Create Linked Asset**.

The new asset looks like a normal Unity asset, but it keeps the stock Addressables identity. Do not unpack it or copy its source files.

## 2. Create the patch variant

In the Project window, right-click the linked prefab and choose **Redux SDK → Create Prefab Patch from Linked Prefab**.

In the window:


1. Select the `Mod` asset that owns the patch.
2. Enter a short patch name that is unique within your mod.
3. Choose an output folder. The suggested location is `Assets/<YourMod>/Patches/Prefabs`.
4. Leave **Open variant after creation** enabled.
5. Click **Create Patch**.

The Redux SDK creates a prefab variant and a neighboring `.prefabpatch.json` manifest. The variant is the file you edit; the JSON is generated output.

## 3. Make a simple change

Open the variant and edit a serialized field in the Inspector—for example, a color, size, enabled state, or component setting. Save the prefab.

With **Auto Compile On Save** enabled, saving recompiles the JSON. Select the root's `PrefabPatchAuthoringMetadata` component to see the target address, operation count, last compile time, and any error.

## 4. Preview and test

Click **Open Effective Prefab Preview** in the metadata Inspector. The preview composes the current patch with other prefab patches available in the project.

Then build and deploy the mod through its normal ThunderKit pipeline and test the change in game. Use a campaign that has your mod on. A newly installed mod is off in campaigns. To turn it on, mark it under **Default Features** in the mods menu, or turn it on with **Edit Pack**. Check `pm_summary.log` if the patch is missing or rejected.

To apply the patch only with one of the [features](/doc/campaign-features-9YIewcIArR) of your mod, list that feature under **Required Features** in the metadata Inspector.

Continue with [Editing prefab variants](/doc/editing-prefab-variants-jDik1AIWwm) before adding objects or references.