Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Using Google ChromeCast From an Android/iOS Game Built in Unity

Discussion in 'External Tools' started by plyrek, Feb 26, 2020.

  1. plyrek

    plyrek

    Joined:
    Mar 2, 2015
    Posts:
    15
    Hello,

    I am looking for some direction for building a game in Unity that allows a player to mirror or cast game results and cinematic's to a Google ChromeCast. I am surprisingly finding very little information about it. I thought it would be more ubiquitous given how many apps can cast to your TV these days. Unfortunately, when it comes to Unity, the only real information about it has been a depreciated Google plugin in the Asset Store from 2016 that obviously does not function.

    I am hoping someone on the forum has experience creating there own plugin for ChromeCast or know of a tutorial for creating a connection to ChromeCast and can point me in the right direction.

    Any assistance would be greatly appreciated.

    Thank you.
     
  2. RobAtApex

    RobAtApex

    Joined:
    Jun 19, 2017
    Posts:
    15
  3. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,024
    My 0.2 cents:
    -Can't you just cast the whole desktop via chrome browser, why would that not work? Then just play the game.
    -Other option is to import some c# sdk/library (quick search I find https://github.com/Tapanila/SharpCaster or https://github.com/kakone/GoogleCast) to your game source, make use that api to cast direct from the game, not sure of the legalities if that would be allowed, or even work, maybe you can post your results here.
     
  4. RobAtApex

    RobAtApex

    Joined:
    Jun 19, 2017
    Posts:
    15
    The question was about casting from Android and iOS. Not sure if chrome browser app can do that to cast other apps on either of those platforms, but also we want users not to have to go to that trouble and cast directly from our apps.

    Those links might be useful failing all else, but probably means writing separate plugins for each platform or some kind of per-platform integration to get this working in Unity. First one talks of Xamarin so not sure if that's usable from Unity.
     
unityunity