Bringing the experience out of the headset
By Aya
09 July 2023
At the end of Found in the Fjords, the player is given an opportunity to learn about and commit to a specific action which will help the future of our oceans. Something that I think the whole team agrees on is that the lasting experience of Found in the Fjords and the commitment the player makes needs to persist even after they take the headset off.
We do this by asking for our player’s email address in the game, and then immediately shoot them an email with further details about how they can follow through with their commitment.
How is ths done?
We set up a free SendGrid account, which allows us to send emails when our game connects with their API. The API receives an API key which is unique to our account, and is also fed some parameters like which email to send (we have one for each commitment) and where to send it to.
Putting this together in our game was a bit of a challenge:
- SendGrid has a library to make the code for this easy in C#, but since this is a Unity Project, it doesn’t play well with NuGet, a package manager that makes adding libraries like SendGrid’s easy.
- We could copy the whole library and manually add it to our Unity project, but that’s a lot of effort for something that should be easy.
So, instead of using SendGrid’s library, we directly contact the API using a UnityWebRequest.