> For the complete documentation index, see [llms.txt](https://sebun1.gitbook.io/skins/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sebun1.gitbook.io/skins/schema/mesh-target.md).

# Mesh Target

## Overview

Mesh replacement is a relatively more advanced usage compared to material target. However, it is not advanced in the sense of the schema — the schema is much simpler since specifying a replacement mesh is all there is to be done. There, however, are some intricacies and restrictions that come with what the mesh can be and how it should be exported again for usage. This is not the purpose of this page, however.

## File Naming

Mesh Targets are structurally recognized the same way as Material Targets, so if you need more details on that, refer to [Material Target](/skins/schema/material-target.md#file-naming-and-folder-structure).

Mesh Targets must have the extension `.meshtarget.json`, and this is the only difference in terms of file system structure compared to Material Targets.

## Manifest Schema

{% code title="\*.meshtarget.json" lineNumbers="true" %}

```jsonc
{
  "type": "AssetBundle",
  "mesh_name": "Front_Precision_2",
  "path": "../helrifle_custom",
  "asset_path": "assets/helrifle/front_precision_2.asset",
  "material_variants": [
    "Front_Precision_2"
  ]
}
```

{% endcode %}

### Fields

<table><thead><tr><th width="180.3331298828125">Field</th><th width="163.8331298828125">Type</th><th width="106.333251953125" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>mesh_name</code></td><td>string</td><td>true</td><td>Exact name of the mesh to match. Must match the in-game mesh name precisely (case-sensitive).</td></tr><tr><td><code>material_variants</code></td><td>array of strings (name of Material)</td><td>false</td><td>Optional array to specify specific variants to match. Only meshes with a corresponding Material name inside the array will be matched. (case sensitive).</td></tr><tr><td><code>type</code></td><td>string (enum)</td><td>true</td><td>The type of reference used to specify the replacement mesh.</td></tr><tr><td><code>path</code></td><td>string</td><td>true</td><td>Path to the file resource of <code>type</code> as specified.</td></tr><tr><td><code>asset_path</code></td><td>string</td><td>false</td><td>Required argument for <code>"type": "AssetBundle"</code>, used to specify the container path of the asset inside the Asset Bundle.</td></tr></tbody></table>

## Mesh Variant Matching

Similar to material targets where the same material name might have variants, meshes can have variants in the context of where they are used. An example I have noticed is the `Screen_Display_2` mesh — this is used on multiple different gears and thus might have the need for differentiation (thought, unlikely).

You can provide an array of Material names you want to match with this Mesh Target under the `material_variants` field. If none specified, it behaves like a wildcard.

## Mesh Replacement Target

This is a variable number of properties used to specify the target mesh for replacement depending on the `type`.

{% hint style="info" %}
Currently there is only the `AssetBundle` reference type, as it is easy to import in-game and a jack-of-all-trades when it comes to formats. If you can import your mesh into Unity (and export it in an AssetBundle), you can use it here.
{% endhint %}

### Asset Bundle

The Asset Bundle reference type references a specific asset inside an [Asset Bundle](https://docs.unity3d.com/2019.4/Documentation/Manual/AssetBundlesIntro.html).

You need to specify the relative location of the asset bundle itself in the `path` field and specify the container path (usually the path of the asset within the Unity project you exported the bundle from) to your Mesh asset in the `asset_path` field.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sebun1.gitbook.io/skins/schema/mesh-target.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
