Need help with MultiPlayer (UNet) and Google Cardboard

Hi y’all,

I’m trying to make a multiplayer game for Google Cardboard and I’m having (a lot) of trouble setting up the players.

My problem is that the Cardboard setup doesn’t allow for 2 Cardboard camera’s in the Scene and therefore turns components in it’s setup on and off. I have a basic understanding of the new UNet and I’m trying to use Instantiate, “isLocalPlayer”, OnConnected and so on to compensate but I’m not a very good programmer and the Cardboard script is taking over at every turn.

Any help or a hint in the right direction would be very much appreciated.
I have included a link to the project for anyone who wants to have a go at it. :slight_smile:

https://www.dropbox.com/s/xzic4f49i40uc9b/CardboardCameraNetworkTest.zip?dl=0

Kind regards,
Mark Vincent

You can have multiple Cardboard objects in the scene, but don’t have more than one Cardboard script. That means you should not use the CardboardMain prefab for each player. Use CardboardHead instead.

You can either let the Cardboard script get auto-created at runtime, or you can create an otherwise empty game object and attach a Cardboard script to it, if you want to edit its properties in the editor.

1 Like

Thanks @dolims
I will try out your suggestion and check back with you.

1 Like