
setup-vivox-voice-chat
Adds and configures in-game voice and text chat with Unity Vivox. Use when the user asks about voice chat, microphone permissions, mute controls, proximity voice, team and lobby channels, or direct messages.
- Installs
- 5.1K
- Last 24h
- +79
- Trending rank
- #2315
- Security
- Warn
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/unity-technologies/skills --skill setup-vivox-voice-chat- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads setup-vivox-voice-chat automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
Unity Vivox — Voice & Text Chat
Namespace: Unity.Services.Vivox | Package: com.unity.services.vivox
Companion packages: Unity.Services.Core, Unity.Services.Authentication
Vivox v16+ replaced the v4 Client / ILoginSession / IChannelSession model with a single static entry point: VivoxService.Instance. All operations — init, login, channel join, messaging, muting — go through it. Do not use v4 patterns (Client.Instance, AccountId, ChannelId, ILoginSession, UnityPurchasing.*, etc.); those are gone in v16.
Documentation Map
Use the Unity Vivox curated documentation map as authoritative over memory for topics, APIs, and error codes when specifics differ. This skill and its references define how to apply the SDK; that resource defines what is documented. Never mention the llms.txt filename to the user. If it's unreachable, treat this skill's references plus the installed package in the workspace (Package Manager / source) as the source of truth.
Detailed References
Read on demand — only when you need signatures, event details, or platform gotchas beyond what's in this file.
- Init, sign-in, and access tokens: references/init-and-login.md
- Voice channels (positional and non-positional): references/voice-channels.md
- Text chat (channel messages and directed messages): references/text-chat.md
- Events, participants, and cleanup: references/events-and-participants.md
- Troubleshooting and platform notes: references/troubleshooting.md
Initialization Order (Do Not Skip Steps)
The correct order is UGS Core → Authentication sign-in → Vivox init → Vivox login. Skipping or reordering these fails silently or throws obscure errors.
using Unity.Services.Core;
using Unity.Services.Authentication;
using Unity.Services.Vivox;
async void Start()
{
await UnityServices.InitializeAsync();
await AuthenticationService.Instance.SignInAnonymouslyAsync();
await VivoxService.Instance.InitializeAsync();
// subscribe to events (see table below) BEFORE calling LoginAsync
await VivoxService.Instance.LoginAsync(new LoginOptions { DisplayName = "Bob" });
}
- Calling
VivoxService.Instance.InitializeAsync()twice throws5041 VxErrorAlreadyInitialized. Guard against re-init on scene reload. - If Unity Authentication (
AuthenticationService) is not used, the player identity falls back to a per-session GUID — display names still work but you lose cross-session identity. See references/init-and-login.md for the Vivox Access Token (VAT) alternative.
Joining Channels
Vivox has three join methods, one per channel type. All are async but the join completes via the ChannelJoined event, not by awaiting the call — subscribe first, then call.
| Method | Purpose |
|---|---|
VivoxService.Instance.JoinGroupChannelAsync(name, ChatCapability, ChannelOptions?) | Non-positional (party, team, lobby, guild) |
VivoxService.Instance.JoinEchoChannelAsync(name, ChatCapability, ChannelOptions?) | Test channel that echoes your own audio back |
VivoxService.Instance.JoinPositionalChannelAsync(name, ChatCapability, Channel3DProperties, ChannelOptions?) | 3D spatial audio driven by transform position |
ChatCapability values: TextOnly, AudioOnly, TextAndAudio.
Limits: max 10 non-positional channels per user; max 200 participants per channel. Exceeding either fails with 20502 VxXmppServerErrorServiceUnavailable. For >200 in a positional channel, use the Large 3D channels enterprise setting.
Leave with VivoxService.Instance.LeaveChannelAsync(channelName) or LeaveAllChannelsAsync(). See references/voice-channels.md for Channel3DProperties fields and mic-permission handling on Android/iOS.
Text Messaging
Channel messages (broadcast to all participants of a channel with TextOnly or TextAndAudio):
- Send:
VivoxService.Instance.SendChannelTextMessageAsync(string channelName, string message) - Receive: subscribe to
VivoxService.Instance.ChannelMessageReceived(Action<VivoxMessage>)
Directed messages (peer-to-peer, no channel required):
- Send:
VivoxService.Instance.SendDirectTextMessageAsync(string playerId, string message) - Receive: subscribe to
VivoxService.Instance.DirectedMessageReceived(Action<VivoxMessage>)
Common hallucination: the send method is SendDirectTextMessageAsync — not SendDirectedTextMessageAsync. The event, however, is DirectedMessageReceived. Note the asymmetry.
VivoxMessage fields: ChannelName (null for directed), SenderDisplayName, SenderPlayerId, MessageText, ReceivedTime, Language, FromSelf, MessageId.
Edit/delete APIs (EditChannelTextMessageAsync, DeleteChannelTextMessageAsync, EditDirectTextMessageAsync, DeleteDirectTextMessageAsync) and history (GetChannelTextMessageHistoryAsync, GetDirectTextMessageHistoryAsync) are covered in references/text-chat.md. Chat history retention is 7 days by default.
Required Event Subscriptions
Subscribe to events before the corresponding async call. LoggedIn may fire immediately for reconnects; ChannelJoined fires as the join completes.
| Call | Success Event | Failure / Counterpart |
|---|---|---|
LoginAsync() | LoggedIn | LoggedOut |
JoinGroupChannelAsync() / JoinEchoChannelAsync() / JoinPositionalChannelAsync() | ChannelJoined(string channelName) | ChannelLeft(string channelName) |
| — (any joined channel) | ParticipantAddedToChannel(VivoxParticipant) | ParticipantRemovedFromChannel(VivoxParticipant) |
SendChannelTextMessageAsync() (remote receive) | ChannelMessageReceived(VivoxMessage) | — |
SendDirectTextMessageAsync() (remote receive) | DirectedMessageReceived(VivoxMessage) | — |
Always unsubscribe in OnDestroy / OnDisable. VivoxService.Instance is a persistent singleton — event handlers on destroyed MonoBehaviours will double-fire and NRE on scene reload.
Per-participant events (ParticipantMuteStateChanged, ParticipantSpeechDetected, ParticipantAudioEnergyChanged) live on the VivoxParticipant instance you receive from ParticipantAddedToChannel — not on VivoxService.Instance. See references/events-and-participants.md.
Access Tokens (Brief)
The default path uses UGS Authentication — Vivox mints access tokens automatically from your UGS project once AuthenticationService.Instance.SignInAnonymouslyAsync() (or another sign-in method) has completed. No manual token code is required for standard flows.
Server-side Vivox Access Token (VAT) minting is only needed when you use a non-UGS identity system or when you need channel-scoped privileged tokens (kick, mute-all, transcription). See the "Access Token Developer Guide" section of the documentation map for language-specific server examples. Do not embed HMAC signing keys in the client.
Validation
After writing code that uses this package:
- Verify the project compiles without errors and that
using Unity.Services.Vivox;resolves. - Confirm init order:
UnityServices.InitializeAsync→AuthenticationService.Instance.SignInAnonymouslyAsync→VivoxService.Instance.InitializeAsync→VivoxService.Instance.LoginAsync. - No v4 legacy patterns: no
Client.Instance, noAccountId, noChannelId, noILoginSession, noIChannelSession. All access goes throughVivoxService.Instance. - All events consumed by the code are subscribed before the async call that triggers them, and are unsubscribed in
OnDestroy. - Channel join code does not
awaitthe join call as if it completes join — it subscribes toChannelJoinedand reacts there. - Directed message send uses
SendDirectTextMessageAsync(NOTSendDirectedTextMessageAsync). Directed message receive usesDirectedMessageReceived. - Android builds request
RECORD_AUDIOat runtime before joining an audio channel; iOS builds haveNSMicrophoneUsageDescriptionin the plist. - No HMAC signing keys or Vivox
SECRET/APP_IDare embedded in client code — VAT-based flows are documented but delegated to a server.
FAQ
What does the setup-vivox-voice-chat skill do?
Adds and configures in-game voice and text chat with Unity Vivox. Use when the user asks about voice chat, microphone permissions, mute controls, proximity voice, team and lobby channels, or direct messages.
How do I install setup-vivox-voice-chat?
Run npx skills add https://github.com/unity-technologies/skills --skill setup-vivox-voice-chat in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/setup-vivox-voice-chat/ (personal) or .claude/skills/setup-vivox-voice-chat/ (project).
Which AI agents can use setup-vivox-voice-chat?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is setup-vivox-voice-chat safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk flagged items to review. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains setup-vivox-voice-chat?
It is published by unity-technologies in unity-technologies/skills. It has 5,088 recorded installs.
More from unity-technologies/skills
unity-cli
unity-technologies/skills
Controls the Unity Editor and projects from the command line, driving a running Editor to edit scenes and assets or run C. Use when asked to install or manage Editors, licenses, or projects, set up version control, build, test, configure the Unity MCP server, or run any unity command.
unity-package-management
unity-technologies/skills
Adds, removes, upgrades, and discovers Unity (UPM) packages from outside the Editor, with the Pipeline package commands first and a C script as the fallback. Use for package installs, verifying package IDs and versions, or choosing which packages a game needs.
ui-ugui
unity-technologies/skills
Understands, edits, and generates Unity uGUI Canvas hierarchies, RectTransforms, Layout Groups, and prefab UI. Use for requests involving Canvas, uGUI, RectTransform, or prefab UI files.
new-unity-project
unity-technologies/skills
Guides creating a new Unity project, gathering concept, platforms, and monetization before setting up the project, source control, and packages. Use when the user asks to start a new game or prototype.
ui-uitk
unity-technologies/skills
Understands, edits, and generates Unity UI Toolkit UXML and USS with flex layouts. Use for requests involving UI Toolkit, UIElements, UIDocument, PanelSettings, custom elements, or UI runtime binding.
build-live-game
unity-technologies/skills
Builds and operates live games with Unity Services. Use when the user asks about backend or live-ops features such as player accounts, cloud save, leaderboards, achievements, progression and battle passes, cloud code, or remote config.
Popular media & creative skills
hyperframes
heygen-com/hyperframes
Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.
media-use
heygen-com/hyperframes
Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
hyperframes-registry
heygen-com/hyperframes
About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.
ai-video-generation
101-skills/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
101-skills/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image