Using the Unity Sample to Test Video and Audio Setup

Once you’ve added video and audio streams parameters to your Unity project’s Genvid Plugin prefab, you can use code from the Genvid Unity sample to quickly check that your streams are set up correctly.

  1. In the Video asset:

    Genvid Video
    1. Change Id to Video.

    2. Change Framerate to 30 or 60.

    3. Keep Capture Type Automatic. (See Genvid Video Parameters for information about other video capture types.)

  2. In the Audio asset:

    1. Change Stream Name to Audio.

    2. Keep Audio Format F32LE.

    3. Keep Audio Mode Unity. (See Genvid Audio Parameters for information about other audio capture types.)

    4. Keep Listener set to None(Audio Listener). (See Genvid Audio Parameters for information about the Listener.)

    Genvid Audio
  3. Open a command line prompt and go to the Unity sample folder.

  4. Run genvid-bastion install mybastion -lu. (See The Local Environment for more about setup and available command line options.)

  5. Run genvid-sdk setup to configure the local cluster.

  6. Run genvid-sdk load-config-sdk to load the services for the SDK.

  7. Run py unity.py load to load the jobs and configuration for this demo.

  8. In the Unity editor, select Window ‣ Genvid to open the Genvid window.

    Genvid Window menu
  9. In the < Select a Cluster > dropdown, click local.

    Genvid Window cluster selection
  10. Start the Services and Web jobs from the Jobs section.

    Jobs buttons
  11. Click Open Link for CUBE SAMPLE in the Links section.

  12. Click Start in the editor.

Your game should now be displayed in the website. You might need to refresh the webpage and wait for the stream to update.

Stream displayed on webpage