by Pivec Labs
TurnBased + Video Chat Voice & Video

TurnBased + Video Chat

Live inside a finished game: TurnBasedVideoChatDemo is the TurnBased demo plus one object that adds face-to-face video chat.

01

Run it#

  1. Deploy the TurnBased Definition's server code (it includes Live) and restart SmartFoxServer.
  2. Open Examples/Live/Scenes/TurnBasedVideoChatDemo.unity, run 2–4 copies and play as usual.
  3. The video chat panel appears top-right as soon as you are in the room: you plus up to three opponents, with Mute and Camera buttons. Voice is open (no push-to-talk) — it's a board game.
02

What was added to the game#

Nothing in the game itself changed. The scene has one extra GameObject, LiveVideoChat, with three components:

  • NetCrafterLiveCall — the call.
  • NetCrafterLiveRoomLink — joins the room call when the game joins its room.
  • LiveVideoChatPanel — the 2×2 panel (built in code, never touches the game's UI).
03

Add it to your own game#

Copy those three components onto any object in a scene with your ConnectionManager. Make sure the Definition's server code includes Live (Live → Setup & Demos shows it). LiveVideoChatPanel.showWhileActive limits the panel to e.g. the game board screen.