Version: 5.3
고급 개발
Profiler window

The Profiler Window

Unity 프로파일러 창은 게임을 최적화하는 데 유용합니다. 이 창에는 게임의 다양한 부분에 소요된 시간이 보고됩니다. 예를 들어 게임 로직 렌더링 및 애니메이션화에 소요되거나 게임 로직에 소요된 시간의 백분율을 보고할 수 있습니다.

You can play your game in the Editor with Profiling on, and it will record performance data. The Profiler window then displays the data in a timeline, so you can see the frames or areas that spike (take more time) than others. By clicking anywhere in the timeline, the bottom section of the Profiler window will display detailed information for the selected frame.

Note that profiling has to instrument your code. This instrumentation has a small impact on the performance of your game. Typically this overhead is small enough to not affect the game framerate. When using profiling it is typical to consider only the ratio (or percentage) of time spent in certain areas. Also, to improve performance focus on those parts of the game that consume the most time. Compare profiling results before and after code changes and determine the improvements you measure. Sometimes changes you make to improve performance might have a negative effect on frame rate; unexpected consequences of code optimization should be expected.

Details of the Profiler window are described in the next page.

참고 항목

Webplayer

For webplayer profiling, follow these steps:

  1. Check the Development Build checkbox in Unity’s Build Settings dialog and also open the Profiler window before starting the build.
  2. When the game is running in the webplayer, make sure that Release Channel is set to Development. Alt+right-click on the web player to open the release channel selection menu.
  3. Select OSXWebPlayer(YOURCOMPUTERNAME) or WindowsWebPlayer(YOURCOMPUTERNAME) as appropriate from the Profiler Window’s Active Profiler drop-down menu.

iOS

Remote profiling can be enabled on iOS devices by following these steps:

  1. Connect your iOS device to your WiFi network (local/adhoc WiFi network is used by profiler to send profiling data from device to the Unity Editor).
  2. Check “Autoconnect Profiler” checkbox in Unity’s build settings dialog.
  3. Attach your device to your Mac via cable, check the “Development Build” checkbox in Unity’s build settings dialog, and hit “Build & Run” in Unity Editor.
  4. When app launches on device open profiler window in Unity Editor (Window->Profiler).

방화벽을 사용하는 경우 방화벽의 아웃바운드 규칙에서 54998 ~ 55511번 포트가 개방되었는지 확인합니다. 해당 포트는 Unity에서 원격 프로파일링에 사용됩니다.

Note: Sometimes Unity Editor might not autoconnect to the device. In such cases profiler connection might be initiated from Profiler Window Active Profiler drop down menu by select appropriate device.

Android

Remote profiling can be enabled on Android devices through two different paths : WiFi or ADB.

WiFi로 프로파일링하려면 다음 절차를 따르십시오.

  1. Android 기기에서 모바일 데이터를 비활성화해야 합니다.
  2. Connect your Android device to your WiFi network.
  3. Attach your device to your Mac/PC via cable, check the “Development Build” and “Autoconnect Profiler” checkboxes in Unity’s build settings dialog, and hit “Build & Run” in Unity Editor.
  4. When the app launches on the device, open the profiler window in Unity Editor (Window->Profiler)
  5. If the Unity Editor fails to autoconnect to the device, select the appropriate device from the Profiler Window Active Profiler drop down menu. Note: The Android device and host computer (running the Unity Editor) must both be on the same subnet for the device detection to work.

ADB 프로파일링을 사용하려면 다음 절차를 따르십시오.

  • Attach your device to your Mac/PC via cable and make sure ADB recognizes the device (i.e. it shows in adb devices list).
  • Check the “Development Build” checkbox in Unity’s build settings dialog, and hit “Build & Run”.
  • When the app launches on the device, open the profiler window in Unity Editor (Window->Profiler)
  • Select the AndroidProfiler(ADB@127.0.0.1:54999) from the Profiler Window Active Profiler drop down menu. Note: The Unity editor will automatically create an adb tunnel for your application when you press “Build & Run”. If you want to profile another application or you restart the adb server you have to setup this tunnel manually. To do this, open a Terminal window / CMD prompt and enter:
adb forward tcp:54999 localabstract:Unity-{여기에 번들 식별자 삽입}

참고: 드롭다운 메뉴 항목은 Android를 타겟으로 선택한 경우에만 표시됩니다.

방화벽을 사용하는 경우 방화벽의 아웃바운드 규칙에서 54998 ~ 55511번 포트가 개방되었는지 확인합니다. 해당 포트는 Unity에서 원격 프로파일링에 사용됩니다.

고급 개발
Profiler window