This is primarily addressed to @borrrden @zgramana & @sweetiewill who have been very helpful on Unity questions. Since you guys have messed around with the relationship between couchbase and Unity, I’d like to get started on the right road, and learn from your experiences.
I chose Unity because I wanted to code the game once and then deploy to any device.
I chose Couchbase because my game is trivia-based which means that the database IS the game… and Couchbase handles the offline-mode + sync-to-cloud interaction the right way. (The #2 option was Parse, which does not support LocalDataStore on Unity… plus the LocalDataStore has a weird #pin method of persisting data offline, which means a lot of bandwidth to constantly fetch-and-pin my whole database over and over. The #3 option was Firebase, which required major workarounds to integrate into Unity and they had no timetable for making any Unity Plugin or SDK.)
So let’s make this work.
I want to deploy to Android phones, Android tablets, iOS phones, iOS tablets, and a WebPlayer (for the browser of desktop computers, ChromeBooks, etc.). So let’s talk about how Couchbase Lite integrates in these areas… specifically using REST API or the Native API.
Deploying to Android from Unity3D
@borrrden says that it might be difficult to make the REST API work because Android shuts down things when the app is backgrounded. Might be able to work around this with a “service” instead of a regular app. Has anyone been able to do this?
I don’t think anyone’s discussed using the Native API on Android. Is anyone aware of any issues with Native API on Android?
Deploying to iOS from Unity3D
Has anyone successfully done this with either REST or Native API? @borrrden mentioned he’s working on an IL2CPP issue, so I’m guessing that we’re waiting on that…
Deploying to WebPlayer from Unity3D
The space-shooter readme file says “This will not build for web player. Web Player puts large amounts of restrictions on the available API, some of which Couchbase Lite makes use of.” That implies that Space Shooter would actually work on all the other platforms. Does it?
@sweetiewill suggested using the REST API to get around this limitation. Do the rest of you agree that Native API simply will not work on WebPlayer? Has anyone actually successfully built a WebPlayer + cbLite app? How about WebPlayer using REST directly to my cbServer in the cloud?
Again, I’m looking for a code-once and deploy-on-all solution. It sounds like Native API won’t work on WebPlayer. Can the REST API work on all of them? Could we get a space-shooter-like demo using REST API that does actually work on Android, iOS, and WebPlayer?
Very grateful for your assistance. Any tips you guys have are most appreciated.