Hosting a Manifest and Assets for ChunkDownloader

Setting up a local host web site

Windows
MacOS
Linux
필요한 사전지식

이 글은 다음 주제에 대한 지식이 있는 분들을 대상으로 합니다. 계속하기 전 확인해 주세요.

The ChunkDownloader patching solution for Unreal Engine requires you to distribute .pak files to a web server, and you must also build a manifest file. This is a text file containing a list of all of the files the user expects to download as well as the expected file size for each one.

When the patching process starts, the manifest is the first thing that ChunkDownloader will download to the user's device, and it uses this information to request and download each of the .pak files one-by-one. The expected file size enables the system to recognize how much progress is made for each file.

1. Required Setup

This guide uses the project from Preparing Assets for Chunking. It is a blank project that uses the Paragon assets for Boris, Crunch, and Khaimera. Follow the steps for that guide to download the assets and set up Primary Asset Labels for each of them, then cook the .pak files containing their chunked data. However, as long as you have assets divided into .pak files, you can follow the steps in the next section.

2. Building the Manifest File

To create a manifest file, follow these steps:

  1. Create a folder called PatchingDemoKey inside the base directory for your project. In our example it is called PatchingDemo/PatchingDemoKey.

  2. Create a new file called BuildManifest-Windows.txt and open it in a text editor.

    ManifestFileWindows.png

  3. Add a new line with a $NUM_ENTRIES field and set its value equal to the number of pak files you are tracking. In our case, it will be 3.

    BuildManifest-Windows.txt

    $NUM_ENTRIES = 3

  4. Add a new line with a $BUILD_ID field and set its value to PatchingDemoKey.

    BuildManifest-Windows.txt

    $BUILD_ID = PatchingDemoKey

  5. Add entries for each of your .pak files with the following information:

    • The .pak filename.

    • The .pak's file size in bytes. To find this, right-click your .pak file and view its properties.

      pakproperties.png

      Make sure to use the file size for the .pak file, not the size on disk.

    • The .pak version. You can set this to any string.

    • The .pak number. This should match the chunk index values you used for your primary asset labels.

    • The .pak file path, relative to where the manifest file will be located.

    Each entry for each field must be on the same line, separated by tabs, otherwise they will not be parsed correctly. For example, our line for pakchunk1001 reads as follows:

    [REGION:codeheader]
    BuildManifest-Windows.txt
    [/REGION]
    $pakchunk1001-WindowsNoEditor.pak   922604157   ver 1001    /Windows/pakchunk1001-WindowsNoEditor.pak
  6. Copy the .pak files from /WindowsNoEditor/PatchingDemo/Content/Paks/ into the PatchingDemoKey folder alongside the manifest, inside a subfolder called Windows.

    PatchingDemoKeyFolder.png

You will need to repeat this process whenever you package your project or want to change what files are available to users. The final manifest file for our example reads as follows:

$NUM_ENTRIES = 3
$BUILD_ID = PatchingDemoKey
$pakchunk1001-WindowsNoEditor.pak   922604157   ver 1001    /Windows/pakchunk1001-WindowsNoEditor.pak
$pakchunk1002-WindowsNoEditor.pak   2024330549  ver 1002    /Windows/pakchunk1002-WindowsNoEditor.pak
$pakchunk1003-WindowsNoEditor.pak   1973336776  ver 1003    /Windows/pakchunk1003-WindowsNoEditor.pak

3. Hosting Files on a Local Test Server

Now that you have packaged your files, you need to host them on a server that your game can download them from, and you need to tell ChunkDownloader where to find the server. For demonstration purposes, we will set up a simple local web site.

  1. In Windows Explorer, open the Start Menu, search for Turn Windows Features on or off, and open it.

    StartMenuWindowsFeatures.png

  2. Inside the Windows Features menu, enable Internet Information Services and click OK.

    WindowsInternetInformationServices.png

  3. Open the Internet Information Services Manager (IIS Manager), then enable Directory Browsing.

    WindowsDirectoryBrowsing.png

  4. In the Connections menu on the left side of the window, unfold Sites and click Default Web Site.

    ConnectionsDefaultWebSite.png

  5. In the Default Web Site Home menu, double-click MIME Types.

    IISMimeTypes.png

  6. In the MIME Types menu, right-click and click Add.

    AddMimeType.png

  7. In the Add MIME Type window, set the File Name extension to .pak, then set the MIME type to application/octet-stream.

    AddMimeType2.png

    This will ensure that IIS simply downloads the file when requested.

    AddMimeType3.png

  8. Navigate to the Default Web Site folder. By default this is C:\inetpub\wwwroot. Create a folder called PatchingDemoCDN.

    DefaultWebSiteFolder.png

  9. Copy the PatchingDemoKey folder into PatchingDemoCDN.

    CopyPatchingDemoKey.png

  10. Open your project's DefaultGame.ini file, then add the following information to define the CDN Base URL:

    DefaultGame.ini

    [/Script/Plugins.ChunkDownloader PatchingDemoLive] +CdnBaseUrls=127.0.0.1/PatchingDemoCDN

    This URL points ChunkDownloader to the website where the files are located. The PatchingDemoLive qualifier enables you to use different CDN deployment configurations depending on your target platform.

The URL we are using in this example only points to the local web site we set up in the earlier steps. If you are trying to connect to a server with a local area network or a remote CDN, you will require additional configuration and security.

Final Result

Now that you have your assets divided into .pak files and staged on a local web site, you can access them with your patching solution in Unreal Engine.

Select Skin
Light
Dark
언리얼 엔진 문서의 미래를 함께 만들어주세요! 더 나은 서비스를 제공할 수 있도록 문서 사용에 대한 피드백을 주세요.
설문조사에 참여해 주세요
건너뛰기

새로운 언리얼 엔진 4 문서 사이트에 오신 것을 환영합니다!

문서 사이트에 대한 의견을 모을 수 있는 피드백 시스템을 포함해서 여러가지 새로운 기능을 준비하고 있습니다. 아래 Documentation Feedback 포럼(영문) 또는 언리얼 엔진 네이버 공식 카페(한글) 중 편하신 곳에 의견이나 문제점을 알려 주세요.

새 시스템이 준비되면 알려 드리겠습니다.

네이버 카페
공식 포럼