Search Results for

    Show / Hide Table of Contents

    Set up the mod project

    中文 | English

    Run this command at the repository root to replay the examples through the local Unity MCP.

    python Docs/Manual/manual/tools/tutorials.py run get-started
    
    Click to expand MCP actionsClick to collapse MCP actions

    Prepare the teaching sample. The recipe provides ${variables}.

    {
      "variables": {
        "sdkCheckout": "../../../Panzer-War-Mod-SDK"
      },
      "calls": []
    }
    

    1. Download and extract the SDK

    1. Open the Panzer War Mod SDK release page and expand Assets.
    2. Download the release ZIP named Panzer-War-Mod-SDK-sdk-*.zip (public release sdk-2026.11.04.1 is about 600 MB). It contains the DLLs and local dependencies and opens without Git; GitHub's auto-generated Source code (zip) may only contain Git LFS pointers.
    3. Check the ZIP against the release’s SHA256SUMS.txt using the download verification steps. Then extract the whole archive into a new folder and keep the layout below.
    <your extract folder>/
    ├─ Packages/                  # SDK dependencies, sibling to UnityProject
    └─ UnityProject/
       ├─ Assets/
       ├─ Packages/
       │  └─ manifest.json
       └─ ProjectSettings/
          └─ ProjectVersion.txt
    

    The outer Packages folder supplies local dependencies the project references, while UnityProject/Packages/manifest.json declares the project's own dependencies. Keep both in place. For a Git checkout, follow the clone and LFS steps.

    2. Check the project folder and version

    1. Open UnityProject and check that it contains Assets/, Packages/manifest.json, and ProjectSettings/ProjectVersion.txt.
    2. Open ProjectVersion.txt and note m_EditorVersion. The verified public release sdk-2026.11.04.1 declares Unity 2022.3.62f1.
    3. For a later release, read m_EditorVersion from that download and follow the Unity version guide to install the same version.
    Click to expand MCP actionsClick to collapse MCP actions

    Check the adjacent public SDK checkout for its declared editor version, sibling package dependency, and vehicle template. Set sdkCheckout to the outer directory if the SDK is elsewhere.

    [
      {
        "tool": "invoke",
        "arguments": {
          "path": "static:System.IO.Directory/Exists",
          "args": [
            "${sdkCheckout}/UnityProject/Assets"
          ]
        },
        "expect": {
          "contains": "(Boolean) True"
        }
      },
      {
        "tool": "invoke",
        "arguments": {
          "path": "static:System.IO.File/ReadAllText",
          "args": [
            "${sdkCheckout}/UnityProject/ProjectSettings/ProjectVersion.txt"
          ]
        },
        "expect": {
          "contains": "m_EditorVersion: 2022.3.62f1"
        }
      },
      {
        "tool": "invoke",
        "arguments": {
          "path": "static:System.IO.File/ReadAllText",
          "args": [
            "${sdkCheckout}/UnityProject/Packages/manifest.json"
          ]
        },
        "expect": {
          "contains": "file:../../Packages/Sdk/com.shanghaiwindy.middlelayer"
        }
      },
      {
        "tool": "invoke",
        "arguments": {
          "path": "static:System.IO.File/Exists",
          "args": [
            "${sdkCheckout}/UnityProject/Assets/ModManager/BuildPipline-Template-Vehicle.asset"
          ]
        },
        "expect": {
          "contains": "(Boolean) True"
        }
      },
      {
        "tool": "invoke",
        "arguments": {
          "path": "static:System.IO.File/Exists",
          "args": [
            "${sdkCheckout}/UnityProject/Assets/ModManager/Template-Blank-Vehicle.asset"
          ]
        },
        "expect": {
          "contains": "(Boolean) True"
        }
      },
      {
        "tool": "invoke",
        "arguments": {
          "path": "static:System.IO.File/Exists",
          "args": [
            "${sdkCheckout}/Packages/Sdk/com.shanghaiwindy.middlelayer/package.json"
          ]
        },
        "expect": {
          "contains": "(Boolean) True"
        }
      }
    ]
    

    3. Open the project in Unity Hub

    1. In Unity Hub, choose Projects → Add → Add project from disk and select UnityProject inside the extract folder, not the outer folder, Assets, or Packages. Check for the three paths listed in section 2 to identify the correct folder.
    2. Open the project from the list with the same editor version declared in ProjectVersion.txt. The first launch downloads packages, imports assets, and compiles scripts, so it takes much longer than later launches; wait for both Hub and Editor progress to finish.
    3. After compilation, check the Console for compile errors. With compilation complete, look for Framework - 框架 in the menu bar. If the menu is missing, check in order: that you opened the inner UnityProject, that the neighboring Packages folder is complete, that extraction finished, and that the editor version matches the declaration.
    4. If Hub reports a missing editor, install that version and open the project again. Common failures: opening the outer folder reports that it is not a Unity project; an incomplete extraction reports missing packages or DLLs; moving Packages away leaves local packages unresolved.

    4. Verify your setup with a bundled template

    1. In File → Build Settings, choose the target platform. For Windows, choose PC, Mac & Linux Standalone → Windows → x86_64. For Android, choose Android. Click Switch Platform when needed.
    2. In Project, select Assets/ModManager/BuildPipline-Template-Vehicle.asset. Click Build Linked Objects to AssetBundle and wait for it to finish.
    3. Select Assets/ModManager/Template-Blank-Vehicle.asset and click Package Mod Now. The Windows example outputs to UnityProject/Build/Mod-Package/StandaloneWindows64/Template-Blank-Vehicle/. After changing assets or platform, build the linked objects again before packaging.
    4. Follow Install mods to add the .modpack for your game's platform. For a map template, use BuildPipline-Template-Blank.asset and Template-Blank-Scene.asset in the same Project folder.

    Packaging the template and loading it in the game confirms the project and editor setup. Next, set the Steam game folder if needed or build your first tank. If your GameHub build can create projects, you can use the GameHub workflow to open the result.

    In this article
    Back to top Panzer War Document