Email Bug Reports in Unity3D (With Automatic Screenshot)February 15, 2016
For the Fragments of Him PC Beta we wanted to make it easy for players to send in bug reports. We wanted this to do a few things that cover most of the questions that we usually have to ask when a bug report is filed:
Luckily, all of this is possible using C#. The following script allows the user to press F1, after which it takes a screenshot and opens up a simple GUI where the user can type in an email address (or just something to identify the user with) and a bug report. When the user clicks the “Send” button the screenshot will be attached to the email and sent to an email account that we can easily access.
Warning: Your login details can be read as plain text with relative ease, only use this when sending builds to trusted testers or when using internally.
You should be able to just copy/paste this script into your project (name the script Email.cs) and drop that on any GameObject in your scene. Press F1 to see it in action.
Couple of notes on the script:
If you have any questions or recommendations, you can get in touch with me on Twitter @elwinverploegen.