Using Firebase Unity Editor DLLs in a PC/Mac Standalone Build

1,391 views
Skip to first unread message

Alex Ferrier

unread,
Nov 8, 2017, 1:00:26 PM11/8/17
to Firebase Google Group
We are trying to ship a PC/Mac standalone build of our Unity3D ios/Android app which relies on anonymous auth and RTDB (only.)

 (yeah I know this has been asked 100x before, use REST, Windows Support is on our roadmap, etc.) 

It seems ridiculous to have to rewrite all of our FirebaseDB code when we clearly have a fully functional version of said app running in the Unity Editor on PC/Mac (for a server, we could in theory even run the Unity Editor on a cloud server, but that's a bit less viable for distributing clients...) 

Has anyone ever tried to take the PC/Mac Firebase bundles/DLLs, and make them work in a Unity Standalone build? Will that even work, or do the internals of the DLLs (which it's a real shame we don't have source for) depend on UnityEditor components? 

Thanks,
Alex

Alex Ferrier

unread,
Nov 8, 2017, 2:37:00 PM11/8/17
to Firebase Google Group
Edited to add: 

 - There are only 64-bit binaries for the Windows/Mac builds provided. That's fine, we can make the app 64-bit only. 
 - It *looks* like we get as far as trying to run if you just "Build" (for x86_64 mac), but can't connect to the database instance as there's no equivalent of Google_ServicesInfo.plist. Is there a way we can explicitly provide that info to our FirebaseApp/DB construction at runtime (potentially with a new app id?) 

Anthony Maurice

unread,
Nov 8, 2017, 5:26:22 PM11/8/17
to fireba...@googlegroups.com
Hi Alex,

This is currently partially possible, though sadly I don't think entirely what you need is.  Database does have support for running in Editor, and can work with standalone builds (I've confirmed this by building and running the Database testapp we provide for x86_64 mac), the problem is that Auth currently does not.  We are aware that having full desktop support for all the Firebase Unity SDKs would be great, and as you pointed out, is on our roadmap.

The steps for getting Database to work are laid out here: https://firebase.google.com/docs/database/unity/start#configuring_the_sdk_for_the_unity_editor, which also answers how to get around the lack of Google_ServicesInfo.plist.  Note that some of functions are extensions on App, so you'll need the "using Firebase.Unity.Editor;" bit for them.

As that page describes, there are currently two supported options for Database from Editor with regards to authentication.  First, if the database is set to public access, then the lack of Auth is fine, but there are obvious concerns about data access then.  Alternatively, you can use a service account (the instructions for setting that up are also on that page), the problem there is all your users would be using the same service account, which I wouldn't recommend.

Sorry there isn't a straightforward solution, but hopefully this helps.

-Anthony

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/1d527580-8bbc-4f72-922c-70baabba30fc%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Alex Ferrier

unread,
Nov 9, 2017, 12:41:56 AM11/9/17
to fireba...@googlegroups.com
Thanks Anthony. That's "good enough to copy a snapshot of our database into an unauthenticated DB instance in a different project and show a working Windows prototype" :) 

We'll cross the auth bridge when we come to it. We're months away from a public product launch on Windows. 

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/sUk2BpXncMo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages