Note: Not all platforms support this feature. Refer to platform specific documentation for further information.
To customize allocator settings you can either edit the configurable values through the Editor UI or supply them as command line arguments.
Note: Refer to the previous individual allocator sections to see the fields customizable through the Editor UI.
To find the name of the allocator parameters you want to change, check the list of allocator settings the Editor and players print when they start up.
For example, to change the block size of the main heap allocators, use -memorysetup-main-allocator-block-size=<new_value>
할당자 파라미터 이름과 기본값:
할당자 | 설명 | 파라미터 이름 | 기본값 | ||
---|---|---|---|---|---|
Main Allocators | Unity에서 대부분의 할당에 사용하는 할당자입니다. | ||||
Main Allocator | Unity에서 대부분의 할당에 사용하는 기본 할당자입니다. | ||||
Main Thread Block Size | 전용 메인 스레드 할당자의 블록 크기입니다. | memorysetup-main-allocator-block-size |
16777216 |
||
Shared Thread Block Size | 공유 스레드 할당자의 블록 크기입니다. | memorysetup-thread-allocator-block-size |
16777216 |
||
Gfx Allocator | Unity에서 Gfx 시스템과 관련된 CPU 할당에 사용하는 할당자입니다. | ||||
Main Thread Block Size | 전용 메인 스레드 Gfx 할당자의 블록 크기입니다. | memorysetup-gfx-main-allocator-block-size |
16777216 |
||
Shared Thread Block Size | 공유 스레드 Gfx 할당자의 블록 크기입니다. | memorysetup-gfx-thread-allocator-block-size |
16777216 |
||
Other Allocators | |||||
File Cache Block Size | 파일 캐시에는 단편화를 방지하기 위한 자체 할당자가 있습니다. 그 할당자의 블록 크기입니다. | memorysetup-cache-allocator-block-size |
4194304 |
||
Type Tree Block Size | 타입 트리에는 많은 작은 할당으로 인한 단편화를 피하기 위해 자체 할당자가 있습니다. 그 할당자의 블록 크기입니다. | memorysetup-typetree-allocator-block-size |
2097152 |
||
Shared Bucket Allocator | 메인 할당자 간에 공유되는 버킷 할당자입니다. | ||||
Bucket Allocator Granularity | 공유 할당자에 있는 버킷의 스텝 크기입니다. | memorysetup-bucket-allocator-granularity |
16 |
||
Bucket Allocator BucketCount | 버킷 크기의 수입니다. | memorysetup-bucket-allocator-bucket-count |
8 |
||
Bucket Allocator Block Size | 버킷에 사용되는 메모리 블록의 크기입니다. | memorysetup-bucket-allocator-block-size |
Editor: 8388608 Player: 4194304
|
||
Bucket Allocator Block Count | 할당할 최대 블록 수입니다. | memorysetup-bucket-allocator-block-count |
Editor: 8 Player: 1
|
||
Fast Per Thread Temporary Allocators | 매우 짧은 할당을 처리하는 스레드 로컬 스토리지(TLS) 할당자입니다. | ||||
Main Thread Block Size | 메인 스레드 스택 크기의 초기값입니다. | memorysetup-temp-allocator-size-main |
Editor: 16777216 Player: 4194304
|
||
Job Worker Block Size | Unity 잡 시스템에 있는 각 잡 워커의 크기입니다. | memorysetup-temp-allocator-size-job-worker |
E262144 |
||
Background Job Worker Block Size | 각 백그라운드 워커의 크기입니다. | memorysetup-temp-allocator-size-background-worker |
32768 |
||
Preload Block Size | 사전 로드 관리자 스택 크기입니다. | memorysetup-temp-allocator-size-preload-manager |
Editor: 33554432 Player: 262144
|
||
Audio Worker Block Size | 각 오디오 워커 스레드의 스택 크기입니다. | memorysetup-temp-allocator-size-audio-worker |
65536 |
||
Cloud Worker Block Size | 클라우드 워커 스레드 스택 크기입니다. | memorysetup-temp-allocator-size-cloud-worker |
32768 |
||
Gfx Thread Blocksize | 메인 렌더 스레드 스택 크기입니다. | memorysetup-temp-allocator-size-gfx |
262144 |
||
GI 베이킹 블록 크기입니다. | 각 GI 워커 스레드의 스택 크기입니다. | memorysetup-temp-allocator-size-gi-baking-worker |
262144 |
||
NavMesh Worker Block Size | 내비 메시 워커 스레드 스택 크기입니다. | memorysetup-temp-allocator-size-nav-mesh-worker |
65536 |
||
Fast Thread Shared Temporary Allocators | 스레드 간에 공유되는 단기 할당을 위한 빠른 리니어 할당자입니다. | ||||
Job Allocator Block Size | Unity에서 주로 잡 워커 스레드에 사용하는 라운드 로빈 리니어 스레드 할당자입니다. | memorysetup-job-temp-allocator-block-size |
2097152 |
||
Background Job Allocator Block Size | 수명이 긴 할당을 허용하는 백그라운드 워커용 리니어 할당자입니다. | memorysetup-job-temp-allocator-block-size-background |
21048576 |
||
낮은 메모리 플랫폼의 잡 할당자 블록 크기입니다. | 메모리가 2GB 미만인 플랫폼은 잡 워커와 백그라운드 잡 모두에 사용하는 크기입니다. | memorysetup-job-temp-allocator-reduction-small-platforms |
262144 |
||
Profiler Allocators | Unity에서 애플리케이션의 할당 패턴을 방해하지 않도록 프로파일러 전용으로 사용하는 할당자입니다. | ||||
Profiler Block Size | 프로파일러의 주요 부분에 대한 블록 크기입니다. | memorysetup-profiler-allocator-block-size |
16777216 |
||
Editor Profiler Block Size | 프로파일러의 에디터 부분에 대한 블록 크기입니다. 이것은 플레이어에 존재하지 않습니다. | memorysetup-profiler-editor-allocator-block-size |
1048576 |
||
Shared Profiler Bucket Allocator | 프로파일러와 에디터 프로파일러 할당자를 위한 공유 버킷 할당자입니다. 메모리가 부족한 플랫폼에는 없습니다. |
||||
Bucket Allocator Granularity | 공유 할당자에 있는 버킷의 스텝 크기입니다. | memorysetup-profiler-bucket-allocator-granularity |
16 |
||
Bucket Allocator BucketCount | 버킷 크기 수입니다. 예를 들어 값이 4인 경우 크기는 16, 32, 48, 64입니다. | memorysetup-profiler-bucket-allocator-bucket-count |
8 |
||
Bucket Allocator Block Size | 버킷에 사용되는 메모리 블록의 크기입니다. | memorysetup-profiler-bucket-allocator-block-size |
Editor: 33554432 Player: 4194304
|
||
Bucket Allocator Block Count | 할당할 최대 블록 수입니다. | memorysetup-profiler-bucket-allocator-block-count |
Editor: 8 Player: 1
|
Tip: To ensure your settings improve performance, profile the application before and after making changes. For more information, refer to the Profiler overview page and the package documentation for the Profiler Analyzer. Profiler Analyzer enables multiframe comparison, which is especially useful for highlighting differences in allocator performance. You can also check the memory usage reports. They are available in the log when you close the Player or Editor. To find your log files, follow the instructions on the log files page.
Unity는 MemorySettings.asset
에 할당자 설정을 저장하고 빌드 시 수정된 설정으로 boot.config
파일을 채웁니다. 이는 모든 빌드마다 새 설정이 적용됨을 의미합니다.
에디터에서 boot.config
는 ProjectSettings
폴더에 있습니다. Unity에서 MemorySettings.asset
을 가져오거나 변경할 때마다 업데이트됩니다. 에디터의 새 값은 다음 에디터 시작 시에만 적용됩니다.