以 Windows 独立平台为目标构建 Unity 项目时,Unity 会生成以下文件(其中“ProjectName”为项目名称):
ProjectName.exe
- 项目可执行文件。此文件包含启动时调用 Unity 引擎的程序入口点。
UnityPlayer.dll
- 此 DLL 包含所有本机 Unity 引擎代码。还会使用 Unity Technologies 证书对此文件进行签名,从而轻松验证引擎未被篡改。
*.pdb files
- 用于调试的符号文件。如果在 Build Settings 窗口中启用了 __Copy PDB files__,Unity 会将这些文件复制到构建目录。
WinPixEventRuntime.dll
- 此 DLL 可启用 Windows PIX 性能分析器支持。仅当在 Build Settings 窗口中选中 Development Build 复选框时,Unity 才会创建此文件。
ProjectName_Data folder
- 此文件夹包含运行项目所需的所有数据。
Unity 在以下文件夹中创建 ProjectName.exe
的源代码:Editor\Data\PlaybackEngines\WindowsStandaloneSupport\Source\WindowsPlayer。
要修改可执行文件或发布您自己构建的代码(例如,如果要对其进行签名),必须重新构建可执行文件并将其放在构建的游戏目录中。
要在 Unity 外部构建可执行文件,必须具备 Visual Studio 2015 或 2017 并安装“Common Tools for Visual C++”和“Windows support for C++”。
2017–07–19 页面已发布
在 2017.2 版中更改了 Windows 独立平台播放器构建二进制文件 NewIn20172
在 2018.1 版中删除了独立平台播放器中的 Windows XP 支持
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.