将项目转换为模板

介绍如何将现有项目转换成模板。

Windows
MacOS
Linux

如需将现有项目转换为模板,请执行以下操作:

  1. 将项目文件夹移动到适当的Templates目录:

    引擎版本

    路径

    Launcher

    C:\Program Files\Unreal Engine[Version]\Templates

    Source

    [ForkLocation]\UE4\Templates

  2. 打开 Templates\[ProjectName]\Config\DefaultGame.ini 文件,添加或更新 ProjectName 变量。

    [/Script/EngineSettings.GeneralProjectSettings]
    ProjectID=E6468D0243A591234122E38F92DB28F4
    ProjectName=MyTestTemplate
  3. 复制 Templates\TP_FirstPerson\Config\TemplateDefs.ini 到 Templates\[ProjectName]\Config\TemplateDefs.ini。你可以使用任何现有模板文件夹替换 TP_FirstPerson。

  4. 打开 Templates\[ProjectName]\Config\TemplateDefs.ini 文件,更新 LocalizedDisplayNamesLocalizedDescriptions 变量。

    [/Script/GameProjectGeneration.TemplateProjectDefs]
    LocalizedDisplayNames=(Language="en",Text="My Test Template")
    LocalizedDescriptions=(Language="en",Text="A project including starter content and a first person character set up in Blueprints.")
  5. 你可以在 Templates\[ProjectName]\[ProjectName].png 中添加一个图标文件。

现在你应该可以在"新建项目"(New Project)对话框中看到这个新模板了。

注意,要想看到新模板,你只需要关闭再打开"新建项目"(New Project)对话框。不过,假如你对现有模板做了任何更改(比如 LocalizedDisplayNames),那么你必须重新启动编辑器, 才能看到改动内容。

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback