Action disabled: source

Measuring Performance with the Built-in Profiler

Unity iOS는 사용자의 프로젝트를 내장된 성능 프로파일러와 함께 제공합니다. 이것은 기본으로 비활성화되어 있다는 것을 참고하세요. 그것을 활성화하기 위해서 사용자는 Unity에서 생성된 XCode 프로젝트를 오픈해야만할 것이고 AppController.mm 파일을 선택하고

#define ENABLE_INTERNAL_PROFILER 0



#define ENABLE_INTERNAL_PROFILER 1

으로 변경합니다. XCode 메뉴에서 결과 (GDB) 콘솔을 보여주기 위해서 Run→Console 을 선택하고 후에 사용자의 프로젝트를 실행합니다. Unity iOS는 매 30 프레임마다 콘솔 윈도우로 통계를 내보낼 것입니다. 예를 들어:

iPhone/iPad Unity internal profiler stats:
cpu-player>    min:  9.8   max: 24.0   avg: 16.3
cpu-ogles-drv> min:  1.8   max:  8.2   avg:  4.3
cpu-waits-gpu> min:  0.8   max:  1.2   avg:  0.9
cpu-present>   min:  1.2   max:  3.9   avg:  1.6
frametime>     min: 31.9   max: 37.8   avg: 34.1
draw-call #>   min:   4    max:   9    avg:   6    |batched:    10
tris #>        min:  3590  max:  4561  avg:  3871  |batched:  3572
verts #>       min:  1940  max:  2487  avg:  2104  |batched:  1900
player-detail> physx:  1.2 animation:  1.2 culling:  0.5 skinning:  0.0 batching:  0.2 render: 12.0 fixed-update-count: 1 .. 2
mono-scripts>  update:  0.5   fixedUpdate:  0.0 coroutines:  0.0 
mono-memory>   used heap: 233472 allocated heap: 548864  max number of collections: 1 collection total duration:  5.7

모든 시간은 프레임당 밀리 세컨으로 측정됩니다. 사용자는 마지막 30 프레임에 대한 최소, 최대 그리고 평균 시간을 볼 수 있습니다.

General CPU Activity

cpu-player
cpu-ogles-drv
cpu-waits-gpu
cpu-present
frametime

Rendering Statistics

draw-call #
tris #
verts #
batched

Detailed Unity Player Statistics

player-detail 섹션은 엔진 내에서 무엇이 일어나고 있는지에 대한 자세한 것들을 제공합니다:

physx
animation
culling
skinning
batching
render
fixed-update-count

Detailed Scripts Statistics

mono-scripts 섹션은 모노 런타임에서 사용된 시간의 자세한 것들을 제공합니다:

update
fixedUpdate
coroutines

Detailed Statistics on Memory Allocated by Scripts

mono-memory 섹션은 사용자에게 모노 garbage collector에 의해 얼마나 많은 메모리가 사용되는지에 대한 정보를 줍니다:

allocated heap
used heap
max number of collections
collection total duration

역링크