firebase-unity-sdk
firebase-unity-sdk copied to clipboard
Feature Request: Add GeoFire in c# for Unity
Firebase itself has great c# support for Unity. Too bad GeoFire is not there yet. Just think of all the game devs out there trying to build the next Pokemon Go...
Thanks!
I'm working on a port from Java to C#. Took about 2 days to fix compiler errors and get something working. But I wanna do a lot of clean-up ...
Hey purple-movies how progress going?
Hi itsallgoodgames,
I've got a C# version storing locations with location-hashs, and I seem to be able to query by location. I changed how it's stored a bit. I think the Firebase SDK's changed a bit since the Java version's been updated. Think what I'm storing's not compatible with the other platforms right now, but it's working in Unity.
I'm prototyping a location-based game with this, so my priority's to get something working rather than maintain compatibility at the moment.
Had some stuff come up, so I haven't got much further cleaning stuff up. Will try to get back to it soon.
If you'd like to help I could create a public repro with what I've got, but the code's pretty ugly right now and I'm kinda testing it on my own project.
i wish i could help but i don't have that level of programming skills, I'm only good with unity. It's really awesome that you're even making a C# version at all, in my desperation i'm now taking a javascript+NodeJS course to make GeoFire functionality using Firebase Cloud Functions. I know that's not ideal though since GeoFire is designed to be called clientside.
I'm not sure what you mean by other platforms compatibility, are you saying its working in Unity but not for example ios,android?
I can most likely wait at least another month or so, maybe you'll have made some more progress by then?
I posted a job offer on unity forums to convert GeoFire to C# just to see what the prices would be, and one dude quoted 350$, a bit steep for me but desperate times call for desperate measures lol I'm not sure yet what I'm gonna do.
I'm certain I'm not the only one looking for this integration since unity is officially supported by firebase now. I sent a feature request and they told me that they're aware of this demand but at the moment are not working on this.
Best of luck with getting it working properly, ill be watching. thanks.
Hi again,
"I'm not sure what you mean by other platforms compatibility, are you saying its working in Unity but not for example ios,android?
"
Yeah - I changed some stuff while porting, but I tried the JS examples to get an idea what should be stored in Firebase DB, shouldn't be a big change to store things so it'll be the same structure.
Recently found/fixed a couple bugs while working with dictionaries in C# when calling setCenter
. Probably good I'm dogfooding this port before making it public.
hey man godspeed and best of luck getting it worthy of a public release. I've done a ton of research and you'd be the first one to release a public C# unity version.
You'll be a hero to the Unity community! lol
it sounds pretty complex with you runnin into bugs, funny how on the firebase google groups they told me it'd be fairly simple to convert the Java version to C#, I didn't believe them haha
Hi, Yeah - it wasn't terribly complicated. Java and C# are pretty similar. Mostly it was a lot of time making changes for syntax differences, and things that work differently with C#. But GeoFire's a fair amount of code and I haven't had time to test and clean up everything (there's still a few places with commented-out Java code).
Also I'm doing this on top of prototyping 2 games and my day-job, so I've not had a lot of time to work with/on it. So far I've got everything I need for my prototype working, but I wanna get a bit further along before I worry 'bout cleaning things up.
I feel you, I too know about juggling different priorities. I learned how to make apps in Unity while doing my day job, and some months were better than others for sure. lets just say the bosses were aware of shifting priorities and now I'm on unemployment LMAO
@purple-movies Any updates to the Unity C# port? I am also very interested in this. Probably would pay for it if it was an add-on in the Asset store.
Hi @itsallgoodgames & @cameronhorst
I've been working hard to make the port as good as I can before releasing on the Asset Store. Also I spent some talking to the Asset Store support to make sure we're in the clear to release it as a paid asset.
It's now storing things in a way that's compatible with the other versions of GeoFire, and I moved everything to use C# style event-listeners on the GeoQuery
class.
I submitted the package for review to the Asset Store last night - I'm not sure how long the Asset Store review process takes, or if I'll need to change anything. I'll post on here again when I hear anything.
Also we'll post when it's released on our site & FB http://www.draconianmarshmallows.com https://www.facebook.com/DraconianMarshmallowsGames
Nice dude!
That's great to hear! Thanks for the update and your hard work on the port! I'm looking forward to checking it out. Will check back on here and the facebook page.
@itsallgoodgames & @cameronhorst - we've been accept on the Asset Store - only took a bit over a month :D
https://www.assetstore.unity3d.com/#!/content/106839
Please check out our quick-start guide to get an idea of what to expect http://www.draconianmarshmallows.com/geofire/guide.php
nice dude!
On Wed, Jan 17, 2018 at 9:07 PM, purple-movies [email protected] wrote:
@itsallgoodgames https://github.com/itsallgoodgames & @cameronhorst https://github.com/cameronhorst - we've been accept on the Asset Store
- only took a bit over a month :D
https://www.assetstore.unity3d.com/#!/content/106839
Please check out our quick-start guide to get an idea of what to expect http://www.draconianmarshmallows.com/geofire/guide.php
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <firebase/firebase-unity-sdk#269>, or mute the thread https://github.com/notifications/unsubscribe-auth/AeT5xYeTrIXgdlOIspoHCs2NwdtH5xAMks5tLqdVgaJpZM4NodqK .
Hi ! It might be a dumb question (I don't know anything about Unity), but can the C# code from 'Geofire for Unity' be used for a Xamarin.android project ?
Hi @jchapuy,
The ported C# code should be usable in other C# projects with a couple tweaks(I think I used some exception class from the UnityEngine namespace while porting, so that'd want to be changed to something more generic).
However the port makes use of the Firebase Database SDK for Unity. I'm not sure how easy it would be to use the SDK with other C# projects.
I noticed you're asking specifically about using this in a Xamarin project with an Android build-target. Would it make sense to use the Java version of Geofire and write a native Android app, or are you looking to go cross-platform in the near future ?
I've looked-at/played-with Xamarin in the past 2 years and it kind of looked like you have to build out the UI layer twice for Android and iOS. Then you just share some business logic and/or networking code. Is this still the case with Xamarin, or did I miss a cross-platform solution for the UI stuff ?
I'm mostly asking cause I'm also interested in finding a more light-weight cross-platform solution (till Unity releases the small/modularized run-time solution promised in '18). I've also considered trying some stuff with Flutter. However I'm put off by the decision to require it all to be written in Google's Dart language, as that would make it tricky to uses other libraries/packages.
Thanks for the interest and I'd be interested to hear suggestions on cross-platform development options.
Hi @purple-movies ,
With Xamarin.forms you can easily create an app for both iOS and Android with more than 90% code shared between them, if not all. Even the UI is shared, so give it a try! I'm in love with Xam.forms :)
Good luck!