As announced here , Unity 5.6 will add a new Facebook build target, which allows you to integrate Facebook into your builds (both WebGL and Gameroom), and upload your games to Facebook straight from the Unity Editor.
We would love to get some feedback from WebGL developers on this functionality. If you are interested, please give it a spin, and share your experiences in this thread.
I donât think that is a requirement. It is listed as âbest practiceâ on the page, which surprises me, because many of the games currently on Gameroom are much bigger then that.
Currently i am testing Unity 5.5.0b9 for Facebook.
I can create, uploade und play if i use in the Build-settings: Facebook â Gameroom(Windows).
But when i use Facebook â webgl : i can create and upload to Facebook but then i can´t start the game.
Questions:
Should the game normaly start in a browser(Firefox) or in the Facebook Gameroom-App ?
Where can i find the settings for webgl, if the game is hosted on Facebook?
Iâm trying to understand whether this user story is possible⌠âI want to play this game inside Facebook on my iPhone.â Meaning, run a webgl blob inside the userâs news feed (not the game room âInstant Gamesâ on Facebook mobile). The use case is the ability to share mini games and have them appear as playable units directly in the wall in the mobile app. Specifically, we have people making mini games in unity playing in webgl, and they would like to âpost my game to my Facebookâ and have their pals play it instantly inside the feed (no horizontal shift to a game download in another section of Facebook). Specifically, look at this page: getready.io/arcade. Each of these projects is a Webgl container made in unity thatâs embeddable on any site- you can embed them in Facebook but the deep link re-routes to our an app download to play- in this version it would play instantly inside Facebook as webgl. So this blob would go into Facebook if we submitted our âplayerâ to Facebook. But we canât figure out if the current version supports this type of use case. Can anyone explain, or better yet, point to an existing Facebook Page that plays webgl content inside the feed. That would be super helpful to see. Thank you!
This is currently not really possible. As mentioned in the manual we donât support mobile at the moment for our WebGL export.
You might be able to make your content run on some high end devices but on average handhelds it will probably not run. Sorry.
While the game perfectly shows up and plays on apps.facebok.com built with webgl and hosted on facebook it doesnât show up in gameroom. only one time it did show up and i was able to play which was even faster than web browser. now i donât know why it doesnât show up on gameroom. there is only settings about gameroom ânativeâ on developers.facebook.com but we target webgl only.
edit: iâm also able to play the game on gameroom via âdownloaded gamesâ tabâŚ
can anyone help me or show me an âupdated and completeâ guide about gameroom webgl publishing.
edit2: now it started showing up in gameroom. i gues for some supernatural reasons.
Iâm trying to upload a build I made using the Facebook target to my Facebook Dev Portal, but I keep getting this âError (try uploading again)â with no explanation on what the error is. Has anyone else come across this error or has some insight on what it could be? Iâve tried uploading manually as well as through the Unity Editor but it doesnât seem to matter.
Yeah, Iâve run into this problemâŚquite awhile ago and did resolve it. So from distant memory, this is what happend and how I fixed it. I manually created a zip file to upload to facebook. It was somewhat large so it takes a long time to load. After the long load time I got
âError (try uploading again)â
In short, it was a file format problem :
Not a zip file
Zip file contained wrong/missing build files
This was for a WebGL build and thatâs where Iâve asked for help (from Unity) and havenât got any help yet :
Facebook WebGL Unity game takes 40 - 60 seconds to load just for a splash image and âplayâ button
Unity best practices for reducing load times doesnât seem to work on Facebook
Unity Bundles must be included in the zip file
Unity canât find files on facebook âtabâ pages (a work around for CORS)
Does Unity âappdataâ work on Facebook?
How do you find the FB appdata dir name?
Unity streamed data must be in zip file
Canât stream data/bundles on cross-domain URLâs due to CORS restrictions
No body is really going to play my games deployed on Facebook because the load times are way too long.
BTW, I hope that my reply helps you fix your problem
I tried facebook native gameroom build/hosting for my WebGL build/hosting on facebook using Unity 2017.1. The native gameroom features should solve a bunch of the WebGL limitations butâŚthe unity built-in âupload buildâ doesnât work for me either. I get the above mentioned error : âError (try uploading again)â
It did âscanâ my local files
It did begin and upload about 4Mb of 40Mb of uncompressed files
Not sure if it tried to upload compressed or uncompressed files
I was able to uncompress the 7zip created by the Unity build and upload that manually to facebook (about 49 files). Facebook initially reports a file size of about 40mb then does some âprocessingâ after which the file size is reported as about 10mb.
I was able to discover the game via facebook gameroom but it didnât run (got a URL error). I was able to discover and run a local unity build via a gameroom âdebugâ mode. The load time was faster (by about 1/2). If I can load the game, it runs and works as expected without errors.
I can no longer discover the game via gameroom and canât load and run it.
I can still see the debug local build for debugging via a gameroom menu and debugging button.
My goal is to have a platform for players to discover my game and play it. I still have hope that facebook will be one of those platforms.
This is the error message detail for Unity 2017.1, using âbuilt-inâ facebook SDK 7.9.4 for 1 unity scene with default main cam and dir light. Project has only facebook SDK settings and 1 168K texture; using âbuild for fb uploadâ. Facebook AppId and upload token added to build/player settings. This is for native gameroom build.
Uploading build to Facebook failed: stdout:
Uploading C:/Unity2017\SplashNPlayScn1-v1.7z to https://graph-video.facebook.com/1510326922381419/assets
stderr:
WebException error: System.Net.WebException: The request was aborted: The request was canceled.
at System.Net.ConnectStream.InternalWrite(Boolean async, Byte[ ] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
at System.Net.ConnectStream.Write(Byte[ ] buffer, Int32 offset, Int32 size)
at Uploader.HttpUploadFile(String url, String artifactsUrl, String paramName, String contentType, NameValueCollection nvc)
at Uploader.Main(String[ ] args) ResponseUri =
System.Net.WebException: The request was aborted: The request was canceled:
Weâre looking into this, should be fixed soon from FB side. And new uploader implementation almost ready, that also will help avoid such situations.
Unity best practices for reducing load times doesnât seem to work on Facebook
Actually, should work. Also, you can try to build webgl build and check build report â stripping (Build Report) for anything that makes your build big and remove that (like 3d physics if you donât need that)
Unity Bundles must be included in the zip file
Well, if you want to include them then yes. But another option is to use your backend with https + setup CORS there
Unity canât find files on facebook âtabâ pages (a work around for CORS)
whatâs tab pages? can you elaborate please?
Does Unity âappdataâ work on Facebook?
Whatâs appdata exactly?
Unity streamed data must be in zip file
Is it a question?
I think you guys are doing a great job as I just managed to get Chasmic Rush up and running in Facebook using WebGL using 2017.1. Note that FYI 2017.2 WebGL is broken.
The game looks nearly identical to the iPhone version, though I did have to remove the blur optimised as the strain would be too much for the browser.
Having some difficulty integrating my WebGL game into Facebook.
Iâm having issues I assume are due to iframe sandboxing (not sure), but seems my parameter passing between Unity â HTML/JS wonât work in the Facebook iframeâŚ
Trying the exact same setup using vanilla WebGL and my own web server works without issue, but as soon as I attempt the same in the Facebook iframe, things fall apart.