次に、アセット問題と改善点についても見ていきます。 [Go to Assets]からアセットの一覧に飛びます。
分かりやすい改善点を見ていきましょう。
例えば、以下のような問題点が表示されます。
Details The AudioClip is long, and its Load Type is set to Decompress On Load. The clip's memory footprint may be excessive, and decompression may impact load times.
Recommendation Consider setting the Load Type to Compressed In Memory or Streaming. If you have concerns about the CPU cost of decompressing Compressed In Memory clips for playback, consider a format which is fast to decompress, such as ADPCM.
翻訳すると以下の通り。
詳細 AudioClip が長く、Load Type が Decompress On Load に設定されています。クリップのメモリフットプリントが大きすぎる可能性があり、解凍がロード時間に影響する可能性があります。
推奨 Load TypeをCompressed In MemoryまたはStreamingに設定する。Compressed In Memoryクリップを解凍して再生する際のCPUコストに懸念がある場合は、ADPCMなど解凍が速いフォーマットを検討してください。
Audioの設定を見ると、確かにオーディオが全部「Decompress On Load」になっていました。
Creating Objects at runtime by calling Object.Instantiate can take a significant amount of CPU time and allocates managed memory. 実行時にObject.Instantiateを呼び出してObjectを作成すると、かなりのCPU時間がかかり、管理されたメモリが割り当てられます。
The Object.name property allocates managed memory. Object.nameプロパティは、管理されたメモリを確保する。
Boxing happens where a value type, such as an integer, is converted into an object of reference type. This causes an allocation on the managed heap. ボックス化は、整数などの値型が参照型のオブジェクトに変換されるときに起こる。これにより、管理ヒープ上に割り当てが発生する。
Debug.Log methods take a lot of CPU time, especially if used frequently. Debug.Logメソッドは、特に頻繁に使用する場合、多くのCPU時間を要する。
コメント