Skip to content

Replace WWW with UnityWebRequest for sound replacement#2782

Open
AncientGrief wants to merge 1 commit intoInterkarma:masterfrom
AncientGrief:UnityWebRequest
Open

Replace WWW with UnityWebRequest for sound replacement#2782
AncientGrief wants to merge 1 commit intoInterkarma:masterfrom
AncientGrief:UnityWebRequest

Conversation

@AncientGrief
Copy link
Copy Markdown
Contributor

Updates the audio loading logic to use UnityWebRequestMultimedia instead of the deprecated WWW class. This implementation uses synchronous waiting to maintain compatibility with the existing architecture.

This implementation is based around how the whole sound caching in DFU works.

It would need a little bit more effort if going the full and correct asynchronous workflow but works for now and gets rid of the warning + might also fixes #2760

Tested with .wav and .ogg replacing music and in-game sounds.

Updates the audio loading logic to use UnityWebRequestMultimedia instead of the deprecated WWW class. This implementation uses synchronous waiting to maintain compatibility with the existing architecture.
@Daneel53
Copy link
Copy Markdown
Contributor

Daneel53 commented Apr 4, 2026

I've tested the new code with both a song replacement with a .ogg file and a sound replacement with a .wav file, everything woks as expected. Replace the proposed PR 2760 that can be closed.
Can be approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants