WebGL에서 오디오는 다른 플랫폼과 다르게 실행됩니다. 다른 플랫폼에서는 FMOD를 내부적으로 사용하여 오디오 재생 및 믹싱을 제공합니다. WebGL 플랫폼은 스레드를 지원하지 않으므로 브라우저에서 오디오 재생 및 믹싱을 자동으로 처리하는 데 사용되는 내부 웹 오디오 API 기반의 다른 구현을 사용해야 합니다.
하지만 이렇게 하면 Unity WebGL에서 오디오 기능이 가장 기본적인 기능만 지원하는 수준으로 제한됩니다. 이 페이지에서는 작동할 것으로 기대되는 기능에 대해 설명합니다. 여기에 나열되지 않은 기능은 현재 WebGL에서 지원되지 않습니다.
오디오 소스는 일시정지, 재시작, 패닝, 롤오프, 피치 설정 및 도플러 효과 지원을 포함한 기본적인 포지션의 오디오 재생을 지원합니다.
다음 AudioSource
API가 지원됩니다.
프로퍼티
clip
dopplerLevel
ignoreListenerPause
ignoreListenerVolume
isPlaying
loop
maxDistance
minDistance
mute
pitch
(Note that only positive values for pitch are supported.)playOnAwake
rolloffMode
time
timeSamples
velocityUpdateMode
volume
메서드
Pause
Play
PlayDelayed
PlayOneShot
PlayScheduled
SetScheduledEndTime
SetScheduledStartTime
Stop
UnPause
PlayClipAtPoint
모든 AudioListener
API가 지원됩니다.
WebGL에서 오디오 클립은 항상 다양한 브라우저에서 널리 지원되는 AAC 형식으로 임포트됩니다.
다음 AudioClip
API가 지원됩니다.
프로퍼티
메서드
AudioClip.Create
는 부분적으로 지원되어 스트리밍 파라미터가 false로 설정되고, AudioClip.Create
가 호출될 때 완전한 오디오 샘플이 로드될 수 있는 경우에만 작동합니다. 그 후 클립을 생성하고 모든 샘플을 로드한 뒤 컨트롤을 반환합니다.AudioClip.SetData
는 부분적으로 지원되어 AudioClip의 콘텐츠 전체를 대체하는 경우에만 작동합니다. offsetSamples
파라미터는 무시됩니다.SystemInfo.supportsAudio
는 WebGL에서 구현되지 않으며 항상 true를 반환합니다.
WWW.audioClip
은 오디오 클립이 브라우저에서 기본적으로 지원하는 형식인 경우에 WebGL에서 작동합니다. 다른 브라우저에서 지원되는 형식 리스트는 지원되는 미디어 포맷에 관한 Mozilla 문서를 참조하십시오.
Microphone
클래스는 WebGL에서 지원되지 않습니다.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.