Skip to content

Ready to Use YouTube Playables SDK for Unity WebG - #39

Open
crudeGithub wants to merge 3 commits into
google:mainfrom
crudeGithub:main
Open

Ready to Use YouTube Playables SDK for Unity WebG#39
crudeGithub wants to merge 3 commits into
google:mainfrom
crudeGithub:main

Conversation

@crudeGithub

Copy link
Copy Markdown

Summary

Integrates the YouTube Playables Web SDK wrapper into the project to support YouTube WebGL playable requirements.

Key Changes

  • YouTube SDK Bridge: Added C# wrappers and JS plugins (.jslib) for game ready/lifecycle, cloud saves, scores, ads, audio sync, and pausing.
  • Automatic WebGL Build Patching: Added an editor build postprocessor to automatically inject the YouTube SDK script and initialization hooks into the built index.html.
  • Editor Fallbacks: Implemented fallback saving (via PlayerPrefs) and ad simulators to allow local development and testing.
  • Documentation & Samples: Included step-by-step setup guides (INTEGRATION_GUIDE.md) and a sample script for integration references.

Verification

  • Verify build output contains the YouTube script in index.html.
  • Verify Editor testing falls back to PlayerPrefs and does not crash.

@bclarkss

bclarkss commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Thanks for contributing, we greatly appreciate your willingness to help improve the development experience.

There are a couple things blocking us from taking this PR though.

Documentation & Samples: Included step-by-step setup guides (INTEGRATION_GUIDE.md) and a sample script for integration references.

These docs are slightly out of date and we should be pointing to https://developers.google.com/youtube/gaming/playables/ to ensure we stay up to date with changes on the platform and reference materials.

Automatic WebGL Build Patching: Added an editor build postprocessor to automatically inject the YouTube SDK script and initialization hooks into the built index.html.

This is a nice solution, but it misses some of the important elements that make https://developers.google.com/youtube/gaming/playables/samples/unity_wrapper#webgl_template work across web/mobile platforms.

Additionally, this does not take into account when project files are to large for ingestion (e.g. .wasm, .data) and might need to follow a different compression path.
https://developers.google.com/youtube/gaming/playables/certification/requirements_stability#3_individual_file_size

Editor Fallbacks: Implemented fallback saving (via PlayerPrefs) and ad simulators to allow local development and testing.

Great add.

YouTube SDK Bridge: Added C# wrappers and JS plugins (.jslib) for game ready/lifecycle, cloud saves, scores, ads, audio sync, and pausing.

For many games this would be a good add as well.

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