optimize-audio

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Critical Rules

关键规则

  • Do not make changes before reporting findings to the user
  • Follow steps in strict order; never jump ahead
  • STOP at every
    WAIT
    checkpoint and await the user's response before continuing
  • Quality is more important than speed: measure before and after every change
  • Always verify results in a device build; Editor audio stats are indicative only
  • 在向用户报告发现结果前,请勿进行任何更改
  • 严格按照步骤顺序操作,切勿跳步
  • 在每个
    WAIT
    检查点处暂停,等待用户回复后再继续
  • 质量优先于速度:每次更改前后都要进行测量
  • 始终在设备构建中验证结果;编辑器音频统计仅作参考

0. Set up the execution path

0. 设置执行路径

Every C# step below runs inside a live Editor through the Unity CLI. The
unity-cli
skill owns getting you there
— installing the CLI, confirming a connected Editor, adding the project's
com.unity.pipeline
package, telling a genuinely absent Editor apart from one stuck in Safe Mode, and discovering the Editor's command catalog. Follow it first; don't re-derive any of it here.
Two things it can't know for you:
  • You need
    eval
    in particular
    , not just a reachable Editor. Confirm it appears in the catalog. Its presence depends on the Pipeline package version, not on the CLI, so a healthy install can still lack it — if it's missing, say so and stop.
  • Do not hand-edit
    .meta
    files to change import settings.
    Importer values only take effect through
    SaveAndReimport()
    in a live Editor, so an unreachable Editor is a stop, not a cue to edit metadata directly.
Run C# with
unity command eval --code '<snippet>'
. Discover the parameter shape from
unity command --format json
rather than assuming one.
unity command
defaults to a 30 second timeout.
以下所有C#步骤都通过Unity CLI在运行中的编辑器内执行。
unity-cli
技能负责帮你完成前期准备
——安装CLI、确认已连接编辑器、添加项目的
com.unity.pipeline
包、区分编辑器确实未运行和陷入安全模式的情况,以及发现编辑器的命令目录。请先遵循该技能的流程;请勿在此处重复推导相关内容。
有两件事它无法为你判断:
  • 你特别需要
    eval
    命令
    ,而不仅仅是可连接的编辑器。请确认它出现在命令目录中。它是否存在取决于Pipeline包的版本,而非CLI,因此即使安装正常也可能缺少该命令——如果缺失,请告知用户并停止操作。
  • 请勿手动编辑
    .meta
    文件来修改导入设置
    。导入器的值只有通过运行中编辑器的
    SaveAndReimport()
    才能生效,因此如果无法连接编辑器,应停止操作,而非直接编辑元数据。
使用
unity command eval --code '<snippet>'
运行C#代码。请通过
unity command --format json
了解参数格式,而非自行假设。
unity command
默认超时时间为30秒。

Passing C# to
eval

eval
传递C#代码

eval
compiles a statement block, not a file. Two consequences, both of which cause a compile error rather than a warning:
  • No
    using
    directives.
    The compiler reads
    using UnityEngine;
    as a resource-disposal statement and rejects it (
    CS0210
    ).
  • Types must be fully qualified. A bare
    AssetDatabase
    or
    AudioImporter
    does not resolve (
    CS0246
    /
    CS0103
    ), and a bare
    Object
    is ambiguous with
    object
    (
    CS0104
    ).
The recipes in resources/audio-import-api.md are written fully qualified so they can be passed to
eval
as-is.
eval
编译的是语句块,而非文件。这会导致两个后果,均会引发编译错误而非警告:
  • 不支持
    using
    指令
    。编译器会将
    using UnityEngine;
    视为资源释放语句并拒绝执行(错误码
    CS0210
    )。
  • 类型必须完全限定。直接使用
    AssetDatabase
    AudioImporter
    无法解析(错误码
    CS0246
    /
    CS0103
    ),直接使用
    Object
    会与
    object
    产生歧义(错误码
    CS0104
    )。
resources/audio-import-api.md中的示例代码已采用完全限定格式,可直接传递给
eval
使用。

1. Pre-Flight: Detect Audio System

1. 预检查:检测音频系统

Before doing anything else, establish the audio environment:
  1. Detect platform and sample rate: Use
    eval
    to read
    EditorUserBuildSettings.activeBuildTarget
    and
    AudioSettings.outputSampleRate
    . The output sample rate affects whether overriding clip sample rates will actually save memory.
  2. Detect AudioMixer presence: Use the mixer-asset query recipe in resources/audio-import-api.md to see if a mixer graph exists. If none exists, note that routing and effect costs are not a concern.
  3. Detect AudioListener: Use the scene-component query recipe in resources/audio-import-api.md for
    UnityEngine.AudioListener
    to confirm exactly one listener is present. Multiple listeners produce incorrect spatialization; zero listeners produce silence.
  4. Proceed only after platform and listener state are confirmed.
在进行任何操作前,先确定音频环境:
  1. 检测平台和采样率:使用
    eval
    读取
    EditorUserBuildSettings.activeBuildTarget
    AudioSettings.outputSampleRate
    。输出采样率会影响覆盖音频片段采样率是否真的能节省内存。
  2. 检测AudioMixer是否存在:使用resources/audio-import-api.md中的混音器资源查询示例,查看是否存在混音器图。如果不存在,则无需关注路由和效果开销。
  3. 检测AudioListener:使用resources/audio-import-api.md中的场景组件查询示例,查找
    UnityEngine.AudioListener
    ,确认恰好存在一个监听器。多个监听器会导致空间化错误;零个监听器会导致无声。
  4. 仅在确认平台和监听器状态后继续操作

2. Assess Current State

2. 评估当前状态

Before recommending any change, gather observable data:
  1. Find all AudioSources: Use the scene-component query recipe in resources/audio-import-api.md for
    UnityEngine.AudioSource
    . For each result, use one
    eval
    call to batch-read properties — see the batch read recipe in resources/audio-import-api.md.
  2. Inspect mixer topology: If a mixer was found in Pre-Flight, use
    eval
    to read the AudioMixer's exposed parameters and group count. A group count above ~8 or effects on the Master group are immediate flags.
  3. Check DSP buffer size: Use the DSP buffer recipe in resources/audio-import-api.md to read buffer size. See DSP Buffer Size Guidelines in resources/platform-settings.md for recommended values.
  4. Report findings before making changes: Summarize ALL detected sources, the listener count, and mixer depth to the user. Flag any immediate risks (e.g., stereo clip with
    spatialBlend = 1
    , Decompress On Load on a clip > 1 MB, reverb on the Master group).
WAIT for the user to review the assessment before proceeding.
在推荐任何更改前,先收集可观测数据:
  1. 查找所有AudioSource:使用resources/audio-import-api.md中的场景组件查询示例,查找
    UnityEngine.AudioSource
    。对于每个结果,使用一次
    eval
    调用批量读取属性——请参考resources/audio-import-api.md中的批量读取示例。
  2. 检查混音器拓扑结构:如果在预检查中发现混音器,使用
    eval
    读取AudioMixer的暴露参数和组数量。组数量超过约8个,或Master组上存在效果,都是需要立即关注的标志。
  3. 检查DSP缓冲区大小:使用resources/audio-import-api.md中的DSP缓冲区示例读取缓冲区大小。请参考resources/platform-settings.md中的DSP缓冲区大小指南获取推荐值。
  4. 在进行更改前报告发现结果:向用户总结所有检测到的音频源、监听器数量以及混音器深度。标记任何即时风险(例如,
    spatialBlend = 1
    的立体声片段、大小超过1 MB且设置为Decompress On Load的片段、Master组上的混响效果)。
等待用户评估结果后再继续操作。

3. Understand Request

3. 理解用户需求

Route to the correct section based on what the user needs:
User SaysPath
"audio memory too high" / "memory profiler shows audio"Section 4 — Import settings audit
"load times slow" / "decompression stall"Section 4 — Load Type review
"DSP spike" / "mixer CPU" / "audio CPU high"Section 4B — Mixer audit
"3D sound wrong" / "only left channel plays" / "stereo in 3D"Section 4A — Force To Mono + spatial settings
"quality artifacts" / "voice sounds bad" / "Vorbis crackling"Section 4C — Compression quality tuning
"mobile audio battery" / "mobile memory"Section 4D — Mobile sample rate override
"set import settings on all clips" / "batch audio settings"Section 4 — Bulk import audit
"streaming" / "background loading" / "Addressables audio"Section 4E — Streaming and async load
If the symptom is ambiguous, ask: "Is the problem audio memory usage, DSP CPU spikes, or audio playback quality?"
根据用户需求路由到对应章节:
用户表述对应路径
"音频内存占用过高" / "内存分析器显示音频占用高"第4节——导入设置审核
"加载速度慢" / "解压缩卡顿"第4节——Load Type检查
"DSP峰值" / "混音器CPU占用高" / "音频CPU占用高"第4B节——混音器审核
"3D声音异常" / "仅左声道播放" / "3D场景中的立体声"第4A节——强制单声道+空间设置
"音质失真" / "语音音质差" / "Vorbis格式有杂音"第4C节——压缩质量调优
"移动端音频耗电" / "移动端内存占用高"第4D节——移动端采样率覆盖
"为所有片段设置导入设置" / "批量音频设置"第4节——批量导入审核
"流式播放" / "后台加载" / "Addressables音频"第4E节——流式播放与异步加载
如果症状不明确,请询问:"问题是音频内存占用过高、DSP CPU峰值,还是音频播放质量问题?"

4. Primary Diagnostic Workflow

4. 主要诊断流程

Use the findings from Section 2 to determine which sub-section applies. More than one may apply simultaneously.
根据第2节的发现结果确定适用的子章节。可能同时适用多个子章节。

4A. Force To Mono and Spatial Settings

4A. 强制单声道与空间设置

For any AudioSource where
spatialBlend > 0
(3D positioned sound):
  1. Check clip channel count: Use
    eval
    to read
    audioSource.clip.channels
    . If
    channels == 2
    and
    spatialBlend == 1
    , only the left channel plays — this is a bug, not a feature.
  2. Recommend Force To Mono: Use the read importer recipe in resources/audio-import-api.md to inspect current settings, then apply Force To Mono using the force-to-mono recipe.
  3. Apply and reimport: Report before/after channel counts to the user.
  4. Verify spatial blend: Use
    eval
    to confirm
    audioSource.spatialBlend
    is
    1.0
    (full 3D) and
    audioSource.rolloffMode
    is set to an appropriate curve.
对于任何
spatialBlend > 0
的AudioSource(3D定位声音):
  1. 检查片段声道数:使用
    eval
    读取
    audioSource.clip.channels
    。如果
    channels == 2
    spatialBlend == 1
    ,则仅左声道会播放——这是一个bug,而非特性。
  2. 建议启用强制单声道:使用resources/audio-import-api.md中的读取导入器示例检查当前设置,然后使用强制单声道示例启用该设置。
  3. 应用设置并重新导入:向用户报告更改前后的声道数。
  4. 验证空间混合设置:使用
    eval
    确认
    audioSource.spatialBlend
    1.0
    (完全3D),且
    audioSource.rolloffMode
    设置为合适的曲线。

4B. AudioMixer Audit

4B. AudioMixer审核

  1. Measure group depth: Use
    eval
    to walk the mixer's group tree and count levels. More than 3 levels (Master → SFX / Music / Voice → sub-bus) adds routing overhead every frame, even when children are silent.
  2. Check effects on silent groups: Use
    eval
    to query each group's effects list. Effects such as
    AudioReverbFilter
    run their DSP at full cost even when no AudioSource routes to that group.
  3. Flag SFX Reverb on parent groups: This is the most expensive built-in effect. If found on the Master or a high-level group, flag it explicitly.
  4. Present recommendations to the user:
    • Remove or bypass effects on groups that have no active sources.
    • Use snapshots to switch mix states (combat / explore / pause) rather than toggling effects at runtime.
    • Flatten unnecessary sub-buses; redirect sources to a shallower ancestor.
    WAIT for the user to approve the mixer changes before applying.
  5. Verify DSP buffer size: If
    bufferLength
    from Pre-Flight is very small (< 256), recommend increasing it — see DSP Buffer Size Guidelines in resources/platform-settings.md.
  1. 测量组深度:使用
    eval
    遍历混音器的组树并计算层级。超过3个层级(Master → SFX / Music / Voice → 子总线)会增加每帧的路由开销,即使子组处于静默状态。
  2. 检查静默组上的效果:使用
    eval
    查询每个组的效果列表。诸如
    AudioReverbFilter
    之类的效果即使没有AudioSource路由到该组,也会以全开销运行DSP。
  3. 标记父组上的SFX混响:这是最耗费性能的内置效果。如果在Master组或高层组上发现该效果,请明确标记。
  4. 向用户呈现建议
    • 移除或绕过没有活动音频源的组上的效果。
    • 使用快照切换混音状态(战斗/探索/暂停),而非在运行时切换效果。
    • 扁平化不必要的子总线;将音频源重定向到层级更浅的祖先组。
    等待用户批准混音器更改后再应用。
  5. 验证DSP缓冲区大小:如果预检查中的
    bufferLength
    非常小(<256),建议增大该值——请参考resources/platform-settings.md中的DSP缓冲区大小指南。

4C. Compression Quality Tuning

4C. 压缩质量调优

  1. Read current compression format: Use the read importer recipe in resources/audio-import-api.md to read
    compressionFormat
    and
    quality
    for the clips reported by the user.
  2. Apply the platform matrix: See the Compression Format Matrix in resources/platform-settings.md for per-platform recommendations.
  3. Warn about lossy sources: Use the lossy source check recipe in resources/audio-import-api.md. If the original file is MP3, warn the user that lossy source quality is lost permanently after Unity re-encodes. Recommend WAV or AIFF sources.
  1. 读取当前压缩格式:使用resources/audio-import-api.md中的读取导入器示例,读取用户报告的片段的
    compressionFormat
    quality
  2. 应用平台矩阵:请参考resources/platform-settings.md中的压缩格式矩阵获取各平台的推荐设置。
  3. 警告有损源文件:使用resources/audio-import-api.md中的有损源文件检查示例。如果原始文件是MP3,警告用户Unity重新编码后会永久丢失有损源文件的质量。建议使用WAV或AIFF源文件。

4D. Mobile Sample Rate Override

4D. 移动端采样率覆盖

  1. Identify SFX clips on mobile target: Use the scene-component query recipe for
    UnityEngine.AudioSource
    and filter for non-music, non-dialogue clips.
  2. Read current sample rate setting: Use the read importer recipe in resources/audio-import-api.md to read
    sampleRateSetting
    and
    sampleRateOverride
    for each clip.
  3. Apply mobile override: Use the sample rate override recipe in resources/audio-import-api.md. See Sample Rate Recommendations in resources/platform-settings.md for per-use-case rates.
  4. Report savings: Halving the sample rate halves the PCM memory cost. Report the estimated saving for each clip changed.
  1. 识别移动端目标上的SFX片段:使用
    UnityEngine.AudioSource
    的场景组件查询示例,过滤出非音乐、非对话的片段。
  2. 读取当前采样率设置:使用resources/audio-import-api.md中的读取导入器示例,读取每个片段的
    sampleRateSetting
    sampleRateOverride
  3. 应用移动端覆盖设置:使用resources/audio-import-api.md中的采样率覆盖示例。请参考resources/platform-settings.md中的采样率推荐获取各使用场景的推荐值。
  4. 报告节省的资源:将采样率减半会使PCM内存成本减半。报告每个更改片段的预估节省量。

4E. Load Type and Streaming

4E. Load Type与流式播放

  1. Audit Load Type per clip: Use
    eval
    to read
    clip.loadType
    for each clip found in Section 2.
  2. Apply the decision rule: See Load Type Decision Table in resources/platform-settings.md.
  3. Flag mismatches: See Load Type Mismatch Flags in resources/platform-settings.md. Report both types of mismatches to the user.
  4. Apply
    Load In Background
    for any Streaming clip — use the Load In Background recipe in resources/audio-import-api.md.
  1. 审核每个片段的Load Type:使用
    eval
    读取第2节中找到的每个片段的
    clip.loadType
  2. 应用决策规则:请参考resources/platform-settings.md中的Load Type决策表。
  3. 标记不匹配项:请参考resources/platform-settings.md中的Load Type不匹配标记。向用户报告两种类型的不匹配项。
  4. 为流式播放片段启用
    Load In Background
    ——使用resources/audio-import-api.md中的Load In Background示例。

5. Validation

5. 验证

After any import setting or mixer change:
  1. Re-read clip stats: Use
    eval
    to re-read
    clip.loadType
    ,
    clip.channels
    ,
    AudioSettings.outputSampleRate
    , and the importer's
    compressionFormat
    to confirm the change applied after reimport.
  2. Confirm AudioSource routing: Use the scene-component query recipe for
    UnityEngine.AudioSource
    and verify
    audioSource.outputAudioMixerGroup
    is assigned as expected after any mixer restructure.
  3. Report delta: State the before and after values for each setting changed. Do not assume the change was effective without reading back the applied importer values.
  4. Iterate limit: Maximum 3 adjust-and-verify cycles before pausing to ask the user for feedback.
在进行任何导入设置或混音器更改后:
  1. 重新读取片段统计信息:使用
    eval
    重新读取
    clip.loadType
    clip.channels
    AudioSettings.outputSampleRate
    以及导入器的
    compressionFormat
    ,确认重新导入后更改已生效。
  2. 确认AudioSource路由:使用
    UnityEngine.AudioSource
    的场景组件查询示例,验证任何混音器重构后
    audioSource.outputAudioMixerGroup
    是否按预期分配。
  3. 报告变化值:说明每个更改设置的前后值。不要假设更改已生效,必须读取已应用的导入器值进行确认。
  4. 迭代限制:最多进行3次调整-验证循环,之后暂停并向用户反馈。

6. Troubleshooting

6. 故障排除

Stereo clip on a 3D AudioSource — only left channel audible

3D AudioSource使用立体声片段——仅左声道可闻

  1. Confirm
    audioSource.spatialBlend == 1
    .
  2. Confirm
    audioSource.clip.channels == 2
    .
  3. Enable
    forceToMono
    in the AudioClip importer and reimport. Unity mixes both channels to mono during import, preserving level with
    normalize = true
    (keep on).
  4. If the user does not want to reimport: set
    audioSource.panStereo = 0
    as a runtime workaround, but warn this does not recover stereo information.
  1. 确认
    audioSource.spatialBlend == 1
  2. 确认
    audioSource.clip.channels == 2
  3. 在AudioClip导入器中启用
    forceToMono
    并重新导入。Unity会在导入过程中将两个声道混合为单声道,同时保持
    normalize = true
    (保持启用状态)以维持音量。
  4. 如果用户不想重新导入:设置
    audioSource.panStereo = 0
    作为运行时解决方法,但警告这无法恢复立体声信息。

Decompress On Load clip causes memory spike

Decompress On Load片段导致内存峰值

  1. Confirm
    clip.loadType == AudioClipLoadType.DecompressOnLoad
    and
    clip.length
    is long (> 5 s).
  2. Switch to
    Streaming
    if it is music or ambience,
    CompressedInMemory
    if played only occasionally.
  3. If the clip is short but still large: check
    clip.channels
    (stereo wastes double the memory) and
    clip.frequency
    (high sample rate on a mobile target wastes memory). Apply Force To Mono and/or sample rate override.
  1. 确认
    clip.loadType == AudioClipLoadType.DecompressOnLoad
    clip.length
    较长(>5秒)。
  2. 如果是音乐或环境音,切换为
    Streaming
    ;如果仅偶尔播放,切换为
    CompressedInMemory
  3. 如果片段较短但仍较大:检查
    clip.channels
    (立体声会浪费双倍内存)和
    clip.frequency
    (移动端目标使用高采样率会浪费内存)。应用强制单声道和/或采样率覆盖设置。

AudioMixer CPU spike — DSP thread hot

AudioMixer CPU峰值——DSP线程占用高

  1. Confirm with the mixer-asset query recipe that the mixer graph exists.
  2. Use
    eval
    to list all groups and their attached effects. Look for reverb, chorus, or EQ on high-level groups.
  3. Move expensive effects down to leaf groups that are only active when sources are playing.
  4. Use snapshots to bypass effect chains during gameplay states where they are not heard (e.g., bypass reverb during a menu).
  5. If the DSP buffer is small (64 or 128 samples), raise it — see DSP Buffer Size Guidelines in resources/platform-settings.md.
  1. 使用混音器资源查询示例确认混音器图存在。
  2. 使用
    eval
    列出所有组及其附加的效果。查找高层组上的混响、合唱或均衡器效果。
  3. 将耗费性能的效果下移到仅在音频源播放时才活跃的叶组。
  4. 使用快照在不需要听到效果的游戏状态下绕过效果链(例如,菜单期间绕过混响)。
  5. 如果DSP缓冲区较小(64或128样本),增大该值——请参考resources/platform-settings.md中的DSP缓冲区大小指南。

Vorbis quality artifacts on dialogue

对话使用Vorbis格式出现音质失真

  1. Confirm
    defaultSampleSettings.compressionFormat == AudioCompressionFormat.Vorbis
    .
  2. Confirm
    defaultSampleSettings.quality
    — default is 0.5, which is often audible on voice. Raise to 0.7–0.85.
  3. On iOS: switch to AAC instead of Vorbis (hardware decode, better quality at equivalent bitrate).
  4. Confirm the source file is lossless (WAV or AIFF). MP3 sources cannot recover quality lost before Unity's re-encode.
  1. 确认
    defaultSampleSettings.compressionFormat == AudioCompressionFormat.Vorbis
  2. 确认
    defaultSampleSettings.quality
    ——默认值为0.5,这通常会导致语音音质可闻失真。将其提高到0.7–0.85。
  3. 在iOS上:切换为AAC而非Vorbis(硬件解码,在等效比特率下音质更好)。
  4. 确认源文件为无损格式(WAV或AIFF)。MP3源文件无法恢复Unity重新编码前丢失的质量。

AudioListener count is not exactly one

AudioListener数量不是恰好一个

  • Zero listeners: All audio will be silent. Use
    eval
    to add an
    AudioListener
    component to the main camera:
    UnityEngine.Camera.main.gameObject.AddComponent<UnityEngine.AudioListener>()
    .
  • Multiple listeners: Unity uses the last enabled one, producing unpredictable spatialization. Use the scene-component query recipe for
    UnityEngine.AudioListener
    and disable all but the intended one.
  • 零个监听器:所有音频都会无声。使用
    eval
    为主相机添加
    AudioListener
    组件:
    UnityEngine.Camera.main.gameObject.AddComponent<UnityEngine.AudioListener>()
  • 多个监听器:Unity会使用最后启用的监听器,导致不可预测的空间化效果。使用
    UnityEngine.AudioListener
    的场景组件查询示例,禁用除目标监听器外的所有监听器。

Load In Background
causes first-play silence

Load In Background
导致首次播放无声

This is expected behavior: the clip has not finished loading when
Play()
is first called. Mitigate with:
  1. Preload the clip at scene start by calling
    clip.LoadAudioData()
    before it is needed.
  2. Use
    AudioSource.PlayScheduled()
    with a slight delay to allow async load to complete.
  3. For AudioSources that must play immediately: switch to
    CompressedInMemory
    (synchronous on first play) rather than
    Streaming
    with background load.
这是预期行为:首次调用
Play()
时片段尚未完成加载。可通过以下方式缓解:
  1. 在场景启动时预加载片段,在需要播放前调用
    clip.LoadAudioData()
  2. 使用
    AudioSource.PlayScheduled()
    并设置轻微延迟,以允许异步加载完成。
  3. 对于必须立即播放的AudioSource:切换为
    CompressedInMemory
    (首次播放为同步加载),而非启用后台加载的
    Streaming

7. Completion

7. 完成

After finishing the audit or optimization:
  • Summarize every setting changed with before/after values.
  • List any clips or groups that still need attention (e.g., clips that require on-device measurement to confirm savings).
  • If the user needs runtime memory measurement, point them at the Memory Profiler package, which reports the largest AudioClips by runtime byte cost.
  • If mixer CPU is still high after the audit, point them at the Unity Profiler's Audio module for DSP thread profiling.
完成审核或优化后:
  • 总结所有更改的设置及其前后值。
  • 列出仍需关注的片段或组(例如,需要在设备上测量才能确认节省量的片段)。
  • 如果用户需要运行时内存测量,引导他们使用Memory Profiler包,该包会按运行时字节成本报告最大的AudioClip。
  • 如果审核后混音器CPU占用仍然很高,引导他们使用Unity Profiler的Audio模块进行DSP线程分析。

Detailed References

详细参考

  • Platform settings, compression matrix, load types, sample rates: resources/platform-settings.md
  • AudioImporter API recipes and code patterns: resources/audio-import-api.md
  • 平台设置、压缩矩阵、Load Type、采样率resources/platform-settings.md
  • AudioImporter API示例和代码模式resources/audio-import-api.md

See Also

另请参阅

  • Memory Profiler package — finds the largest AudioClips by runtime byte cost.
  • Unity Profiler, Audio module — DSP CPU markers and frame-time budget.
  • audio-setup-mixers
    — creating mixers and routing Audio Sources into groups.
  • Memory Profiler包——按运行时字节成本查找最大的AudioClip。
  • Unity Profiler,Audio模块——DSP CPU标记和帧时间预算。
  • audio-setup-mixers
    ——创建混音器并将Audio Source路由到组中。