Prefered option to upload sample project on unity answers? Link to github repository?
Hi, I'm stuck with a problem in my project and I managed to narrow down the issue and reproduce it on a simple test program. Now I'd like to have the unity answers community to give the possibility to look at it. Rather than posting several screenshots and code I think it's better to provide the whole unity project. What would be the prefered way ? I would just create a public repository on github and provide a link here.
Answer by Owen-Reynolds · Jan 12, 2017 at 10:25 PM
In my experience UA works best with just a text description: the domain and the problem, settings changed (usually not very many) and code.
Most Qs are answered by people who already know the answer (or at least vaguely remember solving it). So you just need enough to get their attention. Not so many are willing to take the time to download, test and learn it.
And then the goal of UA (and the motivation for people to answer) is to have answers turn up in later Searches. You want to feel your answer might help lots of people. That means having the potential Search terms right there in the Q (GableRoux alludes to this.)
Of course, if you think you have a bug then the bug reporting section has a format for how to submit a bug-causing project. And if it wasn't one, they're nice about writing "intentional" and not making fun of you.
Lastly, maybe this is just me, I think screenshots and links to projects make people more likely to skip a Q. Most screenshots posted here are a dozen default settings. They waste your time trying to find the one or two changes. Links to projects usually turn into recruitment for unpaid collaboration.
Answer by GabLeRoux · Jan 10, 2017 at 07:14 PM
If the code is specific, you can share files directly, please make sure you wrap them in code blocks ctrl+K
in your editor. Screenshots of code are really bad for many reasons. They don't get indexed by search engines (at least not to my knowledge nowadays), they can't be copy pasted quickly (for easier answering), etc.
versus code block:
using System;
namespace AssemblyCSharp
{
public class EmptyClass
{
public EmptyClass ()
{
}
}
}
I know it looks prettier with the screenshot, but it's bad ;)
If you're ok with sharing your whole project publicly, you can share it using a public repository and provide a link to it. This way, you can also pin point lines of code directly in your repository too.
If you want to send only single files, you can use tools such as pastebin or github gist
If you plan to use git (which I recommend) and github, please make sure you add the Unity `.gitignore` at the root of your project so you don't share useless generated files such as the Library
or Temp
folders.
Also provide a license for your project just in case. MIT is cool, you can find a few quick descriptions of what licenses to use on tldrlegal
Thanks for your answer. Like I said, I just narrowed my problem down and created a small test project to reproduce the error. So I don't $$anonymous$$d other people looking into this;) I know how to post simple soure code here, I've already done that a few times;) With screenshots I was refering to screenshots of the inspector/scene view etc. For this particular case I think just posting code combined with some inspector screen shots won't be enough. So I think I use github, since I'm most familiar with it.
Oh yes indeed, creating a public repository with the isolated problem is indeed the right solution then. You can send pictures of the inspector for your actual problem, but having the project won't hurt and it makes it easy for everybody to reproduce.
Also note that if your problem is inspector related, the debug menu in the inspector can reveal some very useful infos.
Your answer
![](https://koobas.hobune.stream/wayback/20220612104534im_/https://answers.unity.com/themes/thub/images/avi.jpg)