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 File Naming & 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
{
"type": "AssetBundle",
"mesh_name": "Front_Precision_2",
"path": "../helrifle_custom",
"asset_path": "assets/helrifle/front_precision_2.asset",
"material_variants": [
"Front_Precision_2"
]
}Fields
| Field | Type | Required | Description |
|---|---|---|---|
mesh_name | string | ✓ | Exact name of the mesh to match. Must match the in-game mesh name precisely (case-sensitive). |
material_variants | array of strings (name of Material) | — | Optional array to specify specific variants to match. Only meshes with a corresponding Material name inside the array will be matched. (case sensitive). |
type | string (enum) | ✓ | The type of reference used to specify the replacement mesh. |
path | string | ✓ | Path to the file resource of type as specified. |
asset_path | string | — | Required argument for "type": "AssetBundle", used to specify the container path of the asset inside the Asset Bundle. |
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.
Info
Currently there is only the
AssetBundlereference 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.
Asset Bundle
The Asset Bundle reference type references a specific asset inside an Asset Bundle.
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.