Ruslan Plastun
Ruslan Plastun

Reputation: 2254

Config files in Assets but still error in Play Mode

I loaded my config files in Assets folder. When I am in Edit Mode this files are visible. But when I hit Play Mode I get an error below. And when I get back into Edit Mode the config files are seen by firebase again.

enter image description here

How can I fix it?

Upvotes: 0

Views: 30

Answers (1)

Patrick Martin
Patrick Martin

Reputation: 3131

From the looks of your log (it's truncated, so I can't see the whole thing) it looks like you have your google-services.json file included. Just double check to make sure that it appears in your assets directory like so: google-services.json

Putting it under Data is my own personal style and isn't necessary. With that being said, you may want to try moving it into the root of your Assets directory. Especially if it was under a special folder (and commenting which special folder below).

Similarly, ensure that you're on the latest Firebase plugin.

Before I go forward with any more troubleshooting steps, also make sure that you're not using a plugin that conditionally removes some assets from a build for localization or cross compilation reasons. If you are, ensure that it's not doing something like moving your google-services.json file to an excluded directory (ex: with a directory that ends in ~).

It can be useful to just re-download your google-services.json file just in case it's been edited in any strange ways. You can do this by going to project settings: project settings

And clicking the button with the text "google-services.json" on it: enter image description here

Finally, I'd recommend just trying to force resolve the play services provider from the Unity editor if none of the above helps: enter image description here

If none of the above works or you think you've found a bug in the Firebase plugin, feel free to reach out to support as well: https://firebase.google.com/support

I hope any of this helps!

--Patrick

Upvotes: 1

Related Questions