When you build a Unity project on the Windows platform, Unity produces the following files, where ProjectName
is the name of your project:
ProjectName.exe
- The project executable. This contains the program entry point which calls into the Unity engine when launched.UnityPlayer.dll
- The DLL file that contains all the native Unity engine code. It’s signed with the Unity Technologies certificate, which lets you verify that no malicious entities have tampered with your engine.*.pdb files
- Symbol files for debugging. Unity copies these to the build directory if you enable Copy PDB files in the Build Settings window.WinPixEventRuntime.dll
- This DLL enables Windows PIX profiler support. Unity only creates this file if you enable the Development Build option in the Build Settings window.ProjectName_Data フォルダー
― このフォルダーは、プロジェクトの実行に必要なすべてのデータを含んでいます。The path to the source code for ProjectName.exe is in the WindowsPlayer folder: Editor\Data\PlaybackEngines\WindowsStandaloneSupport\Source\WindowsPlayer.
To modify the executable, or ship the code which you built yourself (if you want to sign it, for example), you must rebuild the executable and place it in your built game directory.
To build your executable outside of Unity, you need Visual Studio 2019 or 2022 with Desktop development with C++ workload installed.
To create a build for Windows, go to Build Settings (menu:** File > Build Settings). In the Platform list, select Windows, then select Switch Platform.
When you have configured the Build Settings, choose from one of the options below:
これらの設定を使って、Unity がアプリケーションをビルドする方法を設定します。
設定 | 機能 | |
---|---|---|
Target platform | Select Windows to build your app for the Windows platform. | |
Architecture | Select the type of CPU to build for (only applies to Build And Run). | |
Intel 64-bit | Intel/AMD 64-bit CPU architecture. | |
Intel 32-bit | Intel 32-bit CPU architecture. | |
Copy PDB files | Enable this setting to include Microsoft program database (PDB) files in the built Windows Player. PDB files contain debugging information for your application, but might increase the size of your Player. For more information, see Windows debugging. | |
Create Visual Studio Solution | Enable this setting to generate Visual Studio solution files for the project such that you can build the project from Microsoft Visual Studio directly. | |
Development Build | Enable this setting to include scripting debug symbols and the Profiler in your build. When you enable this, Unity sets the DEVELOPMENT_BUILD#define for testing purposes. When you select Development Build, Autoconnect Profiler, Deep Profiling Support, Script Debugging, and Wait for Managed Debugger settings also become available. |
|
Autoconnect Profiler | Enable this setting to automatically connect the Unity Profiler to your build. | |
Deep Profiling Support | Enable this setting to switch Deep Profiling in the Profiler. This makes the Profiler instrument every function call in your application and returns more detailed profiling data. When you enable Deep Profiling Support, it might slow down script execution. | |
Script debugging | Enable this setting to allow your script code to be debugged. Not available on WebGL. | |
Wait for Managed Debugger | Enable this setting to be prompted to attach a debugger before Unity executes any script code. | |
Compression Method (Lumin と WebGL プラットフォームでは使用不可) | Compress the data in your Project when you build the Player. This includes Assets, Scenes, Player settings, and GI data. Choose from the following methods: | |
デフォルト | Windows、Mac、Linux、iOS は、デフォルトでは圧縮しません。Android では、デフォルトの圧縮は ZIP です。ZIP は LZ4HC よりも優れた圧縮結果になりますが、データの解凍が遅くなります。 | |
LZ4 | A fast compression format that’s useful for development builds. For more information, see BuildOptions.CompressWithLz4. | |
LZ4HC | A high compression variant of LZ4 that’s slower to build but produces better results for release builds. For more information, see BuildOptions.CompressWithLz4HC. |
The Asset Import Overrides section allows you to locally override all texture import settings to speed up import and platform switch time. You must avoid shipping your final build with any import overrides, but during development they can be useful to speed up iteration time, especially if assets such as textures resulting in lower resolution is not of any concern.
設定 | 機能 | |
---|---|---|
Max Texture Size | Override the maximum imported texture size. Unity imports textures in the lower of two values: this value, or the Max Size value specified in Texture import settings. The time it takes to import a texture is roughly proportional to the amount of pixels it contains; therefore, reducing maximum allowed texture size can speed up the import times. However, as this setting might result in lower resolution textures, use it only for development purposes. |
|
Texture Compression |
テクスチャインポート設定 で設定されたテクスチャ圧縮オプションをオーバーライドします。 これは、圧縮テクスチャ形式 のいずれかにインポートされたテクスチャにのみ影響します。 |
|
Force Fast Compressor | 適用可能な形式 (BC7、BC6H、ASTC、ETC、ETC2) では、より高速で低品質のテクスチャ圧縮モードを使用します。通常、これにより圧縮アーティファクトが増加しますが、多くの形式では、圧縮自体が何倍も高速になります (2 - 20 倍高速)。 この設定はまた、すべてのテクスチャの クランチ テクスチャ圧縮形式を無効にします。 この効果は、すべてのテクスチャに対して、プラットフォームの テクスチャインポート設定 で Compressor Quality を Fast に設定したのと同様です。 |
|
Force Uncompressed | テクスチャを圧縮しないで、代わりに非圧縮形式を使用します。 これはテクスチャ圧縮プロセス全体をスキップするためインポートが高速ですが、結果のテクスチャはより多くのメモリとゲームデータサイズを消費し、レンダリングパフォーマンスに影響を与える可能性があります。 この効果は、すべてのテクスチャに対して、プラットフォームの テクスチャインポート設定 で Compression を None に設定したのと同様です。 |
また、-overrideMaxTextureSize
と -overrideTextureCompression
エディター コマンドライン引数 を使って、アセットインポートのオーバーライド設定を行い、初期のプロジェクトインポートを変更することもできます。
To build your application, select from one of the following options:
2017–07–19 公開ページ
Windows スタンドアロンプレイヤービルドバイナリ―[2017.2] で変更(https://docs.unity3d.com/2017.2/Documentation/Manual/30_search.html?q=newin20172) NewIn20172
2018.1でスタンドアロンプレイヤーの Windows XP サポートを停止