Version: 2022.2
언어: 한국어
Develop for Windows
Windows debugging

Visual Studio project generation for Windows

The Create Visual Studio Solution Build Setting makes Unity generate a Visual Studio Solution instead of build a Player. Generating a Visual Studio Solution enables you to change your build process. For example, you can:

  • 애플리케이션의 매니페스트를 수정합니다.
  • C++ 코드를 추가합니다.
  • 포함된 리소스를 수정합니다.
  • 연결된 디버거가 있는 애플리케이션을 실행합니다.

Note: This option is only available when you are using the Windows build target.

Create a Visual Studio Solution

경고: Unity 프로젝트를 다시 빌드하기 전에 Visual Studio에서 변경한 내용을 저장하고 백업해야 합니다. 변경 사항을 백업하지 않으면 Unity가 빌드 프로세스 중에 변경 사항을 덮어씁니다.

  1. Go to File > Build Settings > Target Platform.
  2. Select the Windows build target.
  3. Enable the Create Visual Studio Solution build setting.
  4. Select Build to generate the solution.
Create Visual Studio Solution이 선택되어 있는 빌드 설정 패널
Create Visual Studio Solution이 선택되어 있는 빌드 설정 패널

By default, Unity stores the Visual Studio Solution you generate in the same directory as your built project.

Scripting backends

Depending on which scripting backend your Unity project uses, the Visual Studio Solution that Unity generates includes a different number of projects. For the Mono scripting backend, the solution includes three projects. For the IL2CPP scripting backend, the solution includes four projects.

참고: Windows 시스템에서만 Windows IL2CPP를 빌드할 수 있습니다.

프로젝트 리타게팅 마법사

Unity generates a Visual Studio Solution that targets Visual Studio 2015. If you are using a newer version of Visual Studio, you might see the Retarget Projects dialog box when you open your Visual Studio Solution.

The Retarget Projects dialog prompts you to upgrade your Visual Studio Solution to match the Visual Studio version you have installed. Select OK to accept this suggestion.

솔루션 콘텐츠

Below is a list of the projects Unity generates for your Visual Studio Solution.

프로젝트 설명
projectName
(프로젝트 이름을 나타냄)
메인 프로젝트입니다. Visual Studio는 이 프로젝트를 최종 애플리케이션 실행 파일로 빌드합니다. 여기에서 변경을 수행할 가능성이 가장 높습니다.
UnityData
(projectName 프로젝트 내부에 저장됨)
이 프로젝트에는 프로젝트 빌드에 필요한 모든 Unity 전용 파일(예: 에셋)이 들어 있습니다.
UnityPlayerStub UnityPlayer.dll의 스터브 라이브러리입니다. Unity는 이를 통해 실행 파일을 UnityPlayer.dll에 연결하고 사용 가능한 UnityPlayer.dll API를 노출합니다.
Il2CppOutputProject
(IL2CPP 스크립팅 백엔드 전용)
This project contains:
• The generated C++ code which Unity converts from managed assemblies.
• The source code for IL2CPP runtime.
• The IL2CPP garbage collector.
You can debug this code from inside Visual Studio.

Visual Studio의 빌드 설정 옵션

Visual Studio provides a variety of build configuration options. All optimization and debug references in this section refer to the Visual Studio Solution only. To select your options, click on Release and choose from the drop-down menu.

빌드 설정 타입

Configuration 용도 설명
Debug C++ 코드를 디버깅할 때 Debug 설정을 사용합니다.
• Disables all optimization.
• Preserves all debugging information in the code.
• Results in code that runs slowly.
Release Release 설정을 사용하여 게임을 프로파일합니다. • Enables code optimizations.
Master 게임 제출 및 최종 테스트를 위해 Master 설정을 사용합니다. • Disables the profiler.
• Results in the same build time as the Release configuration.
MasterWithLTCG .Only available with the IL2CPP scripting backend is enabled. IL2CPP 스크립팅 백엔드를 사용하는 경우 게임 제출 및 최종 테스트를 위해 Master 또는 MasterWithLTCG를 선택할 수 있습니다. • Enables link time code generation for generated C++ code, IL2CPP runtime and IL2CPP garbage collection.
• Results in much longer build times compared to the Master configuration.
• Resulting application executes faster.
Develop for Windows
Windows debugging
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961