I am learning the world of C# and Unity. And the best way to learn is to do…and ask you guys ALOT of dumb questions.
So here i am, i am about to “release” my free game on the web for friends and family to play. But what if stuff happens? Bad stuff (my bad code).
So i created an empty GameObject to handle and Upload data to my webservice i wrote. Then i read post after post that people would like to turn Debug off? How will they then now of errors? I am guessing there is a better way to do it?
Sorry, what do you mean turn debug off, and what errors are you referring to? Do people know you are sending this data? Hopefully you tell them up front. But if they are just your friends, have them just email you with the steps they took to generate the error which is much better than simply receiving a stack trace. Occasionally users will send us stack traces only in support tickets, and there is nothing to go on and no action we can take as we wouldn’t know how they were generated. Generally you want to test your game first, and not let your users tell you about errors.
Just errors…errors happen in all software no mather how much you tested it before.
Nope. It´s just Debug data…not personal stuff.
Nobody, except payed testers would do that. I have been coding for years…not game coding but for webbs\ software and apps…and the general feedback you get is…“It doesn´t work”.
So that´s how game dev is done? Release a game and hold your thumbs? Why are you not using logs? I have seen plenty of games that does that.
Well, you always test your stuff as good as you can. But you can´t plan for every scenario and every gaming setup.
Sorry, don´t mean to sound like a douche…but i got a bit baffled by your response. In every company i worked for we have used logs…logs our a devs best friend. I have never worked with game dev…i´m still just learning. But to not use logs in order to find bugs sounds a bit odd.
So follow up questions (i´m hear to learn).
Why are logs submitted from a game to a server bad? Is it because of privacy issues?
How can i do this differently? Turn off logs (Debug) and maybe let the user turn it on if they choose to?
Right now i´m not that worried…since it´s just people i know and facebook friends.
Perhaps I wasn’t clear, Agreed, logs are invaluable. But only with context.
Let’s say you received only the following stack trace in the log:
Null Reference Exception in DrawMode…
Would you do? Nothing you can do, as there is no context. However, let’s say you got such a error log WITH context, like an email from a friend or family saying “I was playing your game, and when I rotated it from Portrait to Landscape in Level 1, it crashes. This only happens on my Android 8 device, my Android 7 device works great. I have included the logs”. NOW you can debug, fix and test. I would not expect your friends and family to just say “It doesn’t work”.
How would you turn Debug off, would there be a button for that?
I’m confused, is this still about friends and family or a general release? Because if your friends and family are fine with your debug reporting then I don’t see the issue.
For a general release, sending debug info without the user aware of it has potential privacy concerns, as the data may contain file paths with exposed usernames or real names. It could even have legal implications (there’s plenty of threads on the topic, such as complying with GDPR, dealing with data from young minor children, etc - too big a topic to rehash here).
Then there’s simply the idea that people generally hate it when software contacts a server without the user initiating it. They don’t care that it doesn’t help your development process, because helping you develop your game isn’t what they signed up for when they just wanted to play it.
Thank you for your help on this subject. I understand what you mean. Yeah, that error would be hard to do anything about it. But i have this kind of code in my game:
Timer timer = FindObjectOfType()
if (!timer)
Debug.LogError("For some reason, timer is not found on Scene: " + currentScene.name)
I am a new Unity user and i am really unsure of what methods runs. So, that is very useful for me.
Yes, i could have a checkbox that you implecity have to check to ALLOW debug info. This is just for friends and family so i´m not to worried about it right now. But in future games i would be more careful after reading your info.
Yes, i understand that it might provide a computer username or such things. But this is a WebGL game. Not for sale and i just wanted to share my little progress in Unity. So i´m not super concerned right now.
But thanks for your answer. Very good to know if i descide to make a commercial game.