ABE HASKINS: This is AskFirebase,
the show where we answer all sorts of Firebase questions
on whatever medium you ask questions on.
We take those questions, we give you answers, it's a show.
Let's get into it.
[THEME MUSIC]
Hey folks.
My name is Abe Haskins.
I'm a Firebase engineer here in San Francisco
and I'm here to talk to you about Firebase for Unity.
If you haven't already seen it, I
did a getting started video for Firebase in Unity.
It'll be linked below.
But in the meantime, I want to talk to you
about some of the great questions we've gotten since we
released the Firebase SDK into general availability
a few weeks ago.
Also, unrelated, but if you want to call me Abe, that's great.
You want to call me Ah-bey, you want to call me literally
anything, I'm OK with it.
As long as it starts with an A and has some letters after it,
we're all good.
Let's dive in.
SPEAKER: Hey [BLEEP].
ABE HASKINS: That's not nice.
[MUSIC PLAYING]
Let's get started with the first question from--
my laptop battery's dead.
All right, first question.
On our last YouTube video about Unity,
7Madora1 asked, "Can I use this to build out WebGL games
that I've developed in Unity?"
And the answer is no, you really can't.
Since the Firebase SDK for Unity is
built on the Android SDK and the iOS SDK,
we don't have the ability to build out
for WebGL or PlayStation 3 or some of these other platforms
that Unity supports.
You'll find that some of the features do work,
and even in the editor, they're stubbed out.
So you'll be able to use them and test your code
and compile it and everything like that,
but you won't get the same functionality
you would if you built out the game for the device.
Thanks for your question.
Next question.
On the Firebase mailing list, deepixel asked,
"Why does my app report 'libApp.so cannot be
found?'" This is actually a great question,
and it's related to another issue we've gotten on GitHub
from Sakura777.
He said, "Why is FirebaseApp not able to be found?"
These issues are both related to the timing
of when Unity imports the dependencies it requires
to run the Firebase SDK.
In some environments, you're just going to luck out
and you're not going to have to deal with this,
but it just depends on your specific game
and your specific operating system.
So what you can do is, one, make sure you're on the latest
version of the Unity plugin.
We've pushed some changes that should
help this for a lot of people.
And two, you can go into the assets folder
and go to Play Service Resolver, Android Resolver,
Settings, and there's an Enable Auto Resolution checkbox.
This is just going to do some extra things
to help you get those dependencies imported
and help control that timing so everything's
going to work well for you.
And if you do that, your issues should be solved.
Thanks a ton, Sakura and deepixel.
Next question?
[MUSIC PLAYING]
The next question is one we've been getting a ton.
A lot of people want to upload different assets for their game
into Firebase cloud storage.
And they want to upload images and text, you know,
all of these great things--
movies, et cetera, et cetera.
All those things you need for your game.
You know.
You know the stuff.
They want to upload those into cloud storage,
and then retrieve them in their game,
and just use them in the easiest possible way.
The Firebase Unity SDK is really good
when you're dealing with these storage assets
because you have a lot of control.
You can download them in streams or you can download them
as a byte array.
But you don't have to really do all of that
if you're not interested in dealing
with those more complex flows.
The absolute easiest way to get an asset out of cloud storage,
rendered or consumed in your game in some way,
is to use the triple W package and the GIT download URL
async method that we offer.
With that method, you'll just get a normal URL.
It's a public URL that you can consume and pull down just
like any other URL.
And the triple W package in Unity
makes it really, really simple to take that URL,
download it, and turn it into a material,
turn it into an audio clip, even a movie.
So any of those assets you upload in cloud storage,
or your users upload if they're uploading profile icons
or anything like that, just pull them down with triple W
and you'll be good to go.
If you want to find out more about the triple W package
or how it works with the GIT download URL async method,
you can check out our documentation or the Unity
documentation.
Both are great resources for this.
Thanks a ton for that question, everyone who asked it.
I appreciate it.
Next question.
You guys have no idea how much I spend on conditioner
to get this volume.
And the final question, the big one
we all want to hear about-- cloud functions.
I'm sure you heard, at Google Next,
we announced this awesome thing, cloud functions.
How does that work with Unity?
What can we do with these two things put together?
And the answer is, you can do, like, anything.
If you check out the repo we have,
we have a function sample repo.
And this isn't specific to Unity,
it's just our general function sample repo.
It has 26 different examples of things that functions can do.
And every single one of those you
could do with the Firebase SDK in Unity with cloud functions.
And that's because cloud functions ties
into your real-time database.
It ties into analytics and storage,
and all these other Firebase services
that are supported in Unity.
And it lets you execute code and change things way back
on our cloud, so you don't even have to think about it.
So if you want a game that interacts with an external API,
or you want a game that has some custom authentication
that you've brewed up in your awesome game development shack,
you can do this with cloud functions,
and you don't have to worry about scaling
or anything like that.
So you can absolutely use cloud functions with Unity
and it's highly, highly recommended.
So go check out that repository, it's
got a ton of different samples and every single one
will work great with Unity.
Thanks for the question.
All right everyone, thanks for watching.
That's going to wrap up this AskFirebase featuring Unity.
If you have any more questions, obviously you
can leave them in the YouTube comments
below, post them on Stack Overflow,
tweet them on Twitter with that hashtag,
#AskFirebase, or literally reach out to us in any way.
Tweet at me, tweet at Firebase, shout it
at the top of your lungs near a Google office.
We will hear it, we will answer your questions.
We'll see you next time.
[THEME MUSIC]