4

I want to deploy my Unity3D game on Facebook as canvas App. There are two platforms in unity version 5:

  1. WebPlayer
  2. WebGL (Preview)

I have no idea about both of these builds. I am using Parse to store my user data. And Facebook Unity SDK for social gaming. I have built for IOS platform and now for Canvas App deployment I want to know:

  1. which one of these would be best for Canvas App?

  2. I want to know if there are any issues regarding Parse API or Facebook Unity SDK for WebPlayer/WebGL build?

EDIT:

  1. I have built for WebPlayer and i can not run it on Google Chrome. does it have to do anything with Canvas App too?
  2. I have built for WebGL and tried to run it on Google Chrome and got this alert:

    ( I am using Google Chrome Version 44.0.2403.107 (64-bit) )

    This

Any suggestion/help is highly appreciated.

Umair M
  • 10,298
  • 6
  • 42
  • 74

3 Answers3

2

I will suggest you to not build your game in webplayer, because chrome is dropping support for unity webplayer(Google Chrome version 42 and later has disabled all NPAPI plugins), and other browser will also drop the support sooner or later. The best way forward is to use webGL. WebGL in unity is still getting evolved, but this is the future. I also have developed game for webGL, I didn't face much problems except data storage. Parse does not support webgl yet, you have to look for other services. In my case I have build my own php server and it is working fine. Anyways you have to choose what is best in your case. You should use webGL , but thats my opinion.

Neeraj Kumar
  • 957
  • 1
  • 9
  • 20
1

The error message is more or less self-explanatory: Chrome doesn't support running Unity WebGL when it is run from a local file on disk, because of Chrome security. This is not a real problem, as in production it will always be run from a webserver (http://).

During development, your options are:

  1. Start chrome with access to local files: chrome.exe --allow-file-access-from-files
  2. Host a local webserver (Apacha/WAMP, IIS, etc)
  3. Use firefox
Paul-Jan
  • 16,746
  • 1
  • 63
  • 95
0

You are correct. Building the unity for the web is the way to go. You select web from the build settings and you can upload it to the facebook canvas. The thing with chrome is that it no longer supports NPAPI and that is what the Unity web players uses. You can manually enable it and try out your game in chrome. But for the majority of chrome users unity web player no longer works.

Uri Popov
  • 2,127
  • 2
  • 25
  • 43
  • So its WebGL. I can see in [Facebook Unity SdK's Change Log](https://developers.facebook.com/docs/unity/reference/beta/webgl) that Beta version supports WebGL. But Parse is currently not supporting it yet. Talking about Google Chrome I have built for WebGL and tried to run it on Chrome says "It seems your browser does not support running Unity WebGL content from file:// urls. Please upload it to an http server, or try a different browser." I have updated question with screenshot. – Umair M Jul 29 '15 at 10:59