At first, I thought the advantage was being able to call HttpsCallables
, but now I know that you can call these with some special format and parameters from Postman (and it is also possible using UnityWebRequest
, and if not, could just change them from onCall to onRequest).
Then, I thought that it might include some special authorization info from the client to the server. But context.auth
(from https.onCall(data, context)
) appears to be undefined
. Plus, I can still call the functions from Postman.
Important note: I am not registering users, so I don't need Firebase Auth specifically. But I imagined Firebase added something to verify that the function call was coming from an authorized client (e.g. the app).
I am still using the Functions SDK, but I am wondering, what are the advantages of using this SDK for Unity, when UnityWebRequest
exists? Why should I have an package when I can perform the same call using a UnityWebRequest
? Am I missing something too obvious?
Additional information of how I am using Firebase Functions:
- I have a level editor where people can contribute with levels. I use a function to add these levels to Firestore.
- When these levels are created, a database trigger runs and checks if that level was already created.
- Getting levels from the database to replay.
- Finally, in the future I plan to create a voting system to help me curate the levels.