Token导航 LogoToken导航

Agent Skill · 待分类

ue-audio-system(UE 音频系统)

用于辅助音频、音乐、语音转写、语音合成或声音素材处理。它适合让 Agent 生成配乐说明、整理音频流程、调用语音工具或处理播客和视频配音素材。使用时需要确认输入音频来源、输出格式、时长和模型限制;涉及人声克隆、版权音乐或公开发布时,应先核对授权和合规边界。

ue-audio-system 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在待分类类的 11,209 个 Skill 里排第 2,137。

总安装 1,847周安装 74GitHub Stars 125下载 598核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ue-audio-system(UE 音频系统)
来源仓库:https://github.com/quodsoler/unreal-engine-skills
仓库路径:skills/ue-audio-system
安装命令:
npx skills add https://github.com/quodsoler/unreal-engine-skills --skill ue-audio-system
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/quodsoler/unreal-engine-skills --skill ue-audio-system

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

用于辅助音频、音乐、语音转写、语音合成或声音素材处理。适合让 Agent 生成配乐说明、整理音频流程、调用语音工具或处理播客和视频配音素材。使用时需确认输入音频来源、输出格式、时长和模型限制;涉及人声克隆或公开发布时应先核对授权和合规边界。

安装命令:npx skills add https://github.com/quodsoler/unreal-engine-skills --skill ue-audio-system。建议确认权限范围和维护状态,避免触发不必要的联网或文件读写。

来源仓库内路径:skills/ue-audio-system

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/quodsoler/unreal-engine-skills --skill ue-audi…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

ue-audio-system 怎么安装?

在终端执行 npx skills add https://github.com/quodsoler/unreal-engine-skills --skill ue-audio-system。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

ue-audio-system 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

ue-audio-system 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/quodsoler/unreal-engine-skills --skill ue-audio-system 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

ue-audio-system 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

ue-audio-system 用的人多吗?

公开数据是累计安装 1,847 次,近一周安装 74 次,下载 598 次,GitHub 125 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

ue-audio-system 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
infsh-cli

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
ue-audio-system

UE 音频系统 · 本页

1,847125执行命令未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

UE Audio System

You are an expert in Unreal Engine's audio systems, covering UAudioComponent, sound asset types, spatial attenuation, concurrency management, submix routing, MetaSounds, and runtime audio analysis.

Context Check

Before implementing audio, read .agents/ue-project-context.md for:

  • Audio plugins enabled (Resonance Audio, Steam Audio, Wwise, FMOD, MetaSound plugin version)
  • Target platforms — mobile has strict voice limits; consoles differ from PC
  • Dedicated server flag — audio must be skipped server-side or it will crash/log errors
  • VR flag — VR projects require binaural spatialization settings

Information Gathering

Ask about:

  1. One-shot SFX, looping ambient, music, UI feedback, or dialogue?
  2. Spatialized (follows actor) or global 2D?
  3. Concurrency concern (gunshots, footsteps, explosions)?
  4. Runtime control needed (fade, pause, parameter changes)?
  5. MetaSound procedural or pre-authored SoundCue/SoundWave?

Sound Asset Hierarchy

USoundBase                    // abstract base (SoundBase.h)
  ├── USoundWave              // raw PCM/compressed audio asset
  ├── USoundCue               // node-graph: random, modulator, mixer, attenuator nodes
  └── UMetaSoundSource        // procedural audio graph (MetaSound plugin)

USoundWave — Import.wav/.ogg/.flac. Set SoundClassObject and AttenuationSettings on asset.

USoundCue — Node graph combining multiple waves. Key nodes: USoundNodeRandom, USoundNodeModulator, USoundNodeMixer, USoundNodeAttenuation, USoundNodeLooping, USoundNodeDelay, USoundNodeDistanceCrossFade.

UMetaSoundSource — Procedural audio graph. Declare typed inputs (float, bool, int32, trigger). Set parameters at runtime via UAudioComponent::SetFloatParameter, SetBoolParameter, SetIntParameter.

Streaming Long Audio

For music and ambient tracks exceeding ~30 seconds, set USoundWave::LoadingBehavior: ESoundWaveLoadingBehavior::ForceInline for short SFX, RetainOnLoad for music loaded at level start. Long files should use LoadOnDemand to avoid loading the full waveform into memory. In the editor: SoundWave asset → Details → Loading → Loading Behavior.


Playing Sounds from C++

Fire-and-Forget

#include "Kismet/GameplayStatics.h"

// 2D — not spatialized (UI, music)
UGameplayStatics::PlaySound2D(
    this, ImpactSound, 1.0f /*Vol*/, 1.0f /*Pitch*/, 0.0f /*StartTime*/,
    ConcurrencySettings, OwningActor
);

// 3D — spatialized, requires AttenuationSettings on the sound asset
UGameplayStatics::PlaySoundAtLocation(
    this, GunShotSound, GetActorLocation(), FRotator::ZeroRotator,
    1.0f, 1.0f, 0.0f,
    AttenuationOverride,    // USoundAttenuation* (nullptr = use asset default)
    ConcurrencyOverride,    // USoundConcurrency* (nullptr = use asset default)
    this                    // OwningActor for per-owner concurrency
);

Spawn with Handle

// Returns UAudioComponent* — auto-destroyed when sound finishes if bAutoDestroy=true
UAudioComponent* Comp = UGameplayStatics::SpawnSoundAtLocation(
    this, ExplosionSound, Location, FRotator::ZeroRotator,
    1.0f, 1.0f, 0.0f, AttenuationSettings, nullptr, /*bAutoDestroy=*/true
);

// Attach to a moving component (vehicle engine)
UAudioComponent* EngineAudio = UGameplayStatics::SpawnSoundAttached(
    EngineLoopSound, GetMesh(), NAME_None,
    FVector::ZeroVector, FRotator::ZeroRotator,
    EAttachLocation::SnapToTargetIncludingScale,
    /*bStopWhenAttachedToDestroyed=*/true,
    1.0f, 1.0f, 0.0f, AttenuationSettings, nullptr,
    /*bAutoDestroy=*/false   // keep alive for looping
);

UAudioComponent as Permanent Actor Component

// In constructor:
AudioComponent = CreateDefaultSubobject<UAudioComponent>(TEXT("AudioComponent"));
AudioComponent->SetupAttachment(RootComponent);
AudioComponent->bAutoActivate = false;
AudioComponent->bStopWhenOwnerDestroyed = true;

Playback Control

AudioComponent->SetSound(EngineLoopSound);
AudioComponent->Play(/*StartTime=*/0.0f);
AudioComponent->Stop();
AudioComponent->SetPaused(true);
AudioComponent->FadeIn(0.5f, 1.0f, 0.0f, EAudioFaderCurve::Linear);
AudioComponent->FadeOut(1.0f, 0.0f, EAudioFaderCurve::Linear);
AudioComponent->SetVolumeMultiplier(0.5f);
AudioComponent->SetPitchMultiplier(1.2f);

// Query play state (EAudioComponentPlayState: Playing, Stopped, Paused, FadingIn, FadingOut)
EAudioComponentPlayState State = AudioComponent->GetPlayState();

Delegates (AudioComponent.h)

// Declared in AudioComponent.h:
// DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnAudioFinished)
// DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnAudioPlaybackPercent, const USoundWave*, PlayingSoundWave, const float, PlaybackPercent)
// DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAudioPlayStateChanged, EAudioComponentPlayState, PlayState)

AudioComponent->OnAudioFinished.AddDynamic(this, &AMyActor::OnSoundFinished);
AudioComponent->OnAudioPlaybackPercent.AddDynamic(this, &AMyActor::OnPlaybackPercent);
AudioComponent->OnAudioPlayStateChanged.AddDynamic(this, &AMyActor::OnPlayStateChanged);

// Native (non-UObject) binding — no GC overhead:
// DECLARE_MULTICAST_DELEGATE_OneParam(FOnAudioFinishedNative, UAudioComponent*)
// DECLARE_MULTICAST_DELEGATE_ThreeParams(FOnAudioPlaybackPercentNative, const UAudioComponent*, const USoundWave*, const float)
AudioComponent->OnAudioFinishedNative.AddUObject(this, &AMyActor::OnSoundFinishedNative);
AudioComponent->OnAudioPlaybackPercentNative.AddUObject(this, &AMyActor::OnPlaybackPercentNative);

Sound Attenuation (SoundAttenuation.h)

Defined in USoundAttenuation assets (wrapping FSoundAttenuationSettings). Assign via USoundBase::AttenuationSettings or pass as override to play functions.

Attenuation shapes (EAttenuationShape): Sphere (default, omnidirectional), Capsule (elongated sources), Box (room-shaped), Cone (directional like spotlights).

Distance model (EAttenuationDistanceModel): Linear, Logarithmic (realistic), NaturalSound (perception-matched, recommended), Inverse, LogReverse, Custom (curve-driven).

// Key FSoundAttenuationSettings fields:
uint8 bAttenuate : 1;          // enable distance-based volume falloff
uint8 bSpatialize : 1;         // enable 3D spatialization
// SpatializationAlgorithm: SPATIALIZATION_Default (panning), SPATIALIZATION_HRTF (binaural plugin)

uint8 bAttenuateWithLPF : 1;   // air absorption (distance-based lowpass)
float LPFRadiusMin;            // LPF starts at this distance (cm)
float LPFRadiusMax;            // LPF fully applied at this distance
float LPFFrequencyAtMin;       // Hz at min distance (e.g. 20000.f = bypass)
float LPFFrequencyAtMax;       // Hz at max distance (e.g. 800.f = muffled)

uint8 bEnableListenerFocus : 1;
float FocusAzimuth;            // in-focus cone half-angle (degrees)
float NonFocusAzimuth;         // non-focus cone half-angle (degrees)
float FocusDistanceScale;      // < 1.0 makes focused sound seem closer
float NonFocusVolumeAttenuation;

uint8 bEnableOcclusion : 1;
TEnumAsByte<ECollisionChannel> OcclusionTraceChannel; // e.g. ECC_Visibility
float OcclusionLowPassFilterFrequency;  // Hz when fully occluded
float OcclusionVolumeAttenuation;       // 0..1 volume scale when occluded
float OcclusionInterpolationTime;       // seconds to interpolate

uint8 bEnableReverbSend : 1;
EReverbSendMethod ReverbSendMethod;     // Linear, CustomCurve, Manual
float ReverbWetLevelMin;
float ReverbWetLevelMax;
float ReverbDistanceMin;
float ReverbDistanceMax;

uint8 bEnablePriorityAttenuation : 1;  // reduce priority of distant sounds
float PriorityAttenuationMin;
float PriorityAttenuationMax;

// Override attenuation inline on a UAudioComponent:
AudioComponent->bOverrideAttenuation = true;
AudioComponent->AttenuationOverrides.bAttenuate = true;
AudioComponent->AttenuationOverrides.bSpatialize = true;
AudioComponent->AttenuationOverrides.FalloffDistance = 3000.f;

Audio LOD

Distant sounds can skip processing. Use bAttenuateWithLPF = true with LPFRadiusMin/LPFRadiusMax to low-pass-filter far sounds before full attenuation drops them. Set bEnableSendToAudioLink = false for background ambience that does not need external routing. USoundBase::Priority (0.0–100.0, default 1.0, higher = more important) determines which voices survive when hitting the max channel count set in Audio Settings.


Concurrency (SoundConcurrency.h)

USoundConcurrency controls simultaneous voice count. Assign via USoundBase::ConcurrencySet (TSet<USoundConcurrency*>) or ConcurrencyOverrides (inline FSoundConcurrencySettings when bOverrideConcurrency = true).

// FSoundConcurrencySettings key fields:
int32 MaxCount;               // max simultaneous voices in this group
// USoundBase::Priority (0.0–100.0, default 1.0) determines which voices survive at MaxCount
uint8 bLimitToOwner : 1;      // limit per owning actor if true
TEnumAsByte<EMaxConcurrentResolutionRule::Type> ResolutionRule;
// PreventNew | StopOldest | StopFarthestThenPreventNew | StopFarthestThenOldest
// StopLowestPriority | StopQuietest | StopLowestPriorityThenPreventNew
float RetriggerTime;          // minimum seconds between plays in this group
float VoiceStealReleaseTime;  // fade duration (s) for evicted sounds
EConcurrencyVolumeScaleMode VolumeScaleMode; // Default | Distance | Priority
float VolumeScaleAttackTime;
float VolumeScaleReleaseTime;

Submixes and Sound Classes (SoundSubmix.h)

USoundSubmixBase (abstract)
  USoundSubmixWithParentBase
    USoundSubmix           // standard submix with effects chain
    USoundfieldSubmix      // ambisonics / soundfield
  UEndpointSubmix          // external endpoint (haptics, extra device)

Typical tree: Master > {Music, SFX, Voice, Ambient}. Music submix uses bMuteWhenBackgrounded = true.

// Runtime volume control:
MusicSubmix->SetSubmixOutputVolume(this, 0.5f);  // linear gain multiplier
MusicSubmix->SetSubmixWetLevel(this, 1.0f);
MusicSubmix->SetSubmixDryLevel(this, 0.0f);

// Dynamic parenting:
MyChildSubmix->DynamicConnect(this, MasterSubmix);
MyChildSubmix->DynamicDisconnect(this);

USoundSubmix::SubmixEffectChain holds USoundEffectSubmixPreset assets (reverb USubmixEffectReverbPreset, EQ USubmixEffectEQPreset, dynamics).

Submix Effect Chain

// Add reverb to a submix at runtime
USoundSubmix* ReverbSubmix = LoadObject<USoundSubmix>(nullptr,
    TEXT("/Game/Audio/Submixes/ReverbSubmix"));
USubmixEffectReverbPreset* Preset = NewObject<USubmixEffectReverbPreset>();
Preset->Settings.Density = 0.85f;
Preset->Settings.Diffusion = 0.8f;
Preset->Settings.DecayTime = 2.5f;
ReverbSubmix->SubmixEffectChain.Add(Preset);

Sound classes define volume/pitch hierarchy parallel to submixes. Assign via USoundBase::SoundClassObject.

// Sound Mix modifiers — layer temporary volume/pitch adjustments by sound class:
UGameplayStatics::SetBaseSoundMix(this, DefaultMix);            // set the base mix (usually once)
UGameplayStatics::PushSoundMixModifier(this, CombatMix);        // push a modifier (stacks)
// ... later, when leaving combat:
UGameplayStatics::PopSoundMixModifier(this, CombatMix);         // remove the modifier layer
// ClearSoundMixModifiers removes all pushed modifiers at once
UGameplayStatics::ClearSoundMixModifiers(this);

USoundMix assets define per-USoundClass volume and pitch adjustments. Push/pop lets you layer context-dependent audio profiles (combat, stealth, underwater) without manual volume bookkeeping.


MetaSounds

UMetaSoundSource derives from USoundBase — plays anywhere a USoundBase is accepted.

// UAudioComponent implements ISoundParameterControllerInterface:
MetaComp->SetFloatParameter(FName("Pitch"), 1.5f);
MetaComp->SetBoolParameter(FName("IsUnderwater"), true);
MetaComp->SetIntParameter(FName("SurfaceType"), 2);
MetaComp->SetTriggerParameter(FName("OnImpact"));  // impulse trigger input
MetaComp->ResetParameters();
CriterionSoundCueMetaSound
Runtime parametersLimited (wave params)Typed inputs, full parameter system
Procedural audioNoYes (oscillators, noise, DSP filters)
Reactive to gameplayVia parameter nodesNative — bind any float/bool/trigger
Use whenRandomized pre-authored soundsAdaptive music, procedural SFX, state-driven audio

Submix Spectrum Analysis and Envelope Following (SoundSubmix.h)

// Envelope following:
SFXSubmix->StartEnvelopeFollowing(this);
FOnSubmixEnvelopeBP Env;
Env.BindDynamic(this, &AMyActor::OnSubmixEnvelope);
SFXSubmix->AddEnvelopeFollowerDelegate(this, Env);
SFXSubmix->StopEnvelopeFollowing(this);
// Callback: void OnSubmixEnvelope(const TArray<float>& Envelope);

// Spectrum analysis:
SFXSubmix->StartSpectralAnalysis(this,
    EFFTSize::Medium, EFFTPeakInterpolationMethod::Linear,
    EFFTWindowType::Hann, 0.0f, EAudioSpectrumType::MagnitudeSpectrum
);

TArray<FSoundSubmixSpectralAnalysisBandSettings> Bands;
FSoundSubmixSpectralAnalysisBandSettings LowBand;
LowBand.BandFrequency = 80.f; LowBand.AttackTimeMsec = 10.f; LowBand.ReleaseTimeMsec = 100.f;
Bands.Add(LowBand);

FOnSubmixSpectralAnalysisBP Spectral;
Spectral.BindDynamic(this, &AMyActor::OnSpectralAnalysis);
SFXSubmix->AddSpectralAnalysisDelegate(
    this, Bands, Spectral,
    30.f /*UpdateRateHz*/, -40.f /*DecibelFloor*/, true /*Normalize*/, false /*AutoRange*/
);
SFXSubmix->StopSpectralAnalysis(this);
// Callback: void OnSpectralAnalysis(const TArray<float>& Magnitudes);

Module Dependencies

// In .Build.cs:
PublicDependencyModuleNames.AddRange(new string[] { "Engine", "AudioMixer" });
PublicDependencyModuleNames.Add("MetasoundEngine");    // for MetaSound parameters
PublicDependencyModuleNames.Add("MetasoundFrontend");
#include "Components/AudioComponent.h"
#include "Kismet/GameplayStatics.h"
#include "Sound/SoundBase.h"
#include "Sound/SoundCue.h"
#include "Sound/SoundWave.h"
#include "Sound/SoundAttenuation.h"
#include "Sound/SoundConcurrency.h"
#include "Sound/SoundSubmix.h"

Audio Analysis

Submix Spectrum and Envelope

See the existing submix analysis section above for real-time analysis via USoundSubmix.

Non-Real-Time Analysis (NRT)

UAudioAnalyzerNRT is the abstract base class for offline analyzers. ULoudnessNRT and UOnsetNRT derive from UAudioSynesthesiaNRT, which in turn derives from UAudioAnalyzerNRT.

For offline audio analysis (e.g., beat detection for rhythmic gameplay), use the Audio Synesthesia plugin:

// Build.cs: "AudioSynesthesia"
#include "AudioSynesthesiaModule.h"

// Create an analyzer — LoudnessNRT analyzes an entire sound asset offline
ULoudnessNRT* Analyzer = NewObject<ULoudnessNRT>();
ULoudnessNRTSettings* Settings = NewObject<ULoudnessNRTSettings>();
Settings->AnalysisPeriod = 0.01f; // 10ms windows

Analyzer->Settings = Settings;
Analyzer->Sound = MySoundWave;
Analyzer->AnalyzeAudio();  // WITH_EDITOR only; call from editor utility or cook-time code

// Query results at specific timestamps
float Loudness;
Analyzer->GetLoudnessAtTime(1.5f, Loudness);

// For beat detection, use OnsetNRT:
UOnsetNRT* OnsetAnalyzer = NewObject<UOnsetNRT>();
OnsetAnalyzer->Sound = MySoundWave;
OnsetAnalyzer->AnalyzeAudio();  // WITH_EDITOR only
TArray<float> OnsetTimestamps;
TArray<float> OnsetStrengths;
OnsetAnalyzer->GetNormalizedChannelOnsetsBetweenTimes(
    0.f, Duration, 0, OnsetTimestamps, OnsetStrengths);

Why NRT: Pre-analyze tracks to generate beat maps, loudness curves, or onset markers. Use the data at runtime for music-driven gameplay without per-frame FFT overhead.


Common Mistakes and Anti-Patterns

Spawning a new AudioComponent every fire event

// WRONG — leaks a component instance per call
UAudioComponent* Comp = NewObject<UAudioComponent>(this);
Comp->SetSound(FireSound); Comp->Play();

// CORRECT — fire-and-forget for one-shots
UGameplayStatics::PlaySoundAtLocation(this, FireSound, GetActorLocation());
// CORRECT — cache a single component for repeated/looping sounds
if (!CachedFireAudio) { CachedFireAudio = UGameplayStatics::SpawnSoundAttached(..., /*bAutoDestroy=*/false); }
CachedFireAudio->Play();

Playing 3D sounds without attenuation

// WRONG — full volume at any distance
UGameplayStatics::PlaySoundAtLocation(this, FootstepSound, Location);
// CORRECT — pass or assign USoundAttenuation with sphere falloff tuned to gameplay scale

Ignoring concurrency on high-frequency sounds

// WRONG — 20 simultaneous explosions with default concurrency
UGameplayStatics::PlaySoundAtLocation(this, ExplosionSound, Location);
// CORRECT — pass USoundConcurrency: MaxCount=4, ResolutionRule=StopFarthestThenOldest

Playing audio on a dedicated server

// WRONG — FAudioDevice not initialized on server, causes crash/log spam
void AWeapon::Fire() { UGameplayStatics::PlaySoundAtLocation(this, FireSound, GetActorLocation()); }
// CORRECT
void AWeapon::Fire() {
    if (GetNetMode() != NM_DedicatedServer) {
        UGameplayStatics::PlaySoundAtLocation(this, FireSound, GetActorLocation());
    }
}

Forgetting to unbind delegates before destruction

// In EndPlay:
if (AudioComponent) { AudioComponent->OnAudioFinished.RemoveAll(this); AudioComponent->Stop(); }

Using PlaySound2D for in-world sounds

// WRONG — no attenuation or spatialization
UGameplayStatics::PlaySound2D(this, GunShot);
// CORRECT
UGameplayStatics::PlaySoundAtLocation(this, GunShot, GetActorLocation());

Platform and Edge Case Considerations

  • Mobile — 16–32 voice limit. Use aggressive concurrency. Prefer resident loading for SFX. Disable HRTF unless the platform supports it.
  • Dedicated servers — Guard all audio calls with GetNetMode()!= NM_DedicatedServer.
  • Streaming audio — Set LoadingBehavior = LoadOnDemand on long music SoundWave assets. Never load minutes of music resident.
  • App focus loss — Set bMuteWhenBackgrounded = true on music/SFX submixes. For custom handling:

Focus Loss Handling

// In your GameInstance or AudioManager
FCoreDelegates::ApplicationWillDeactivateDelegate.AddUObject(
    this, &UMyAudioManager::OnAppDeactivate);

void UMyAudioManager::OnAppDeactivate()
{
    FAudioDeviceHandle Device = GEngine->GetMainAudioDevice();
    if (Device.IsValid()) { Device->SetTransientPrimaryVolume(0.f); }
}
  • VR — Enable bSpatialize = true and SpatializationAlgorithm = SPATIALIZATION_HRTF on all 3D attenuation assets.
  • Audio LOD — Use bEnablePriorityAttenuation to reduce priority of distant sounds before voice-budget culling.

Related Skills

  • ue-actor-component-architecture — UAudioComponent lifetime, attachment, and replication patterns
  • ue-niagara-effects — synchronizing audio events with particle system callbacks
  • ue-cpp-foundations — delegate binding patterns, UPROPERTY and UFUNCTION macros

平台分布

Codex

35.37%
按下载量换算212

Claude

29.26%
按下载量换算175

Cursor

20.03%
按下载量换算120

Gemini CLI

9.51%
按下载量换算57

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/quodsoler/unreal-engine-skills --skill ue-audio-system 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills