I’m making a card game. The script does not work, well it does it works on the Hand panel but not the cards themselves. I have spent at least 5 hours on this and I haven’t been able to fix it. I am willing to send my Unity file if It means someone can fix this. I know its its updating to be stuck in one spot, but even when I fixed that There was still not dragging.
Sounds like you wrote a bug… and that means… time to start debugging!
Debugging is not optional. Debugging is an integral part of developing any application.
By debugging you can find out exactly what your program is doing so you can fix it.
Use the above techniques to get the information you need in order to reason about what the problem is.
You can also use Debug.Log(...); statements to find out if any of your code is even running. Don’t assume it is.
Once you understand what the problem is, you may begin to reason about a solution to the problem.
Remember with Unity the code is only a tiny fraction of the problem space. Everything asset- and scene- wise must also be set up correctly to match the associated code and its assumptions.
Two steps to tutorials and / or example code:
- do them perfectly, to the letter (zero typos, including punctuation and capitalization)
- stop and understand each step to understand what is going on.
If you go past anything that you don’t understand, then you’re just mimicking what you saw without actually learning, essentially wasting your own time. It’s only two steps. Don’t skip either step.
Step #2 is particularly critical when learning.
If you are unwilling or unable to do Step #2, just ask someone else to do the whole game for you.
Imphenzia: How Did I Learn To Make Games:
If you learn more and things are still confusing you, try this template:
How to report your problem productively in the Unity3D forums:
This is the bare minimum of information to report:
- what you want
- what you tried
- what you expected to happen
- what actually happened, log output, variable values, and especially any errors you see
- links to actual Unity3D documentation you used to cross-check your work (CRITICAL!!!)
The purpose of YOU providing links is to make our job easier, while simultaneously showing us that you actually put effort into the process. If you haven’t put effort into finding the documentation, why should we bother putting effort into replying?
If you post code, only post the relevant code and always use the format button above. Do not post photographs of code.
Remember, we are not here to do your work! You are going to do your work yourself, perhaps based on our answers to your questions. Therefore it is of critical importantance that you ask the question well if you want useful answers.
When asking a question, it’s best to provide as much information as possible:
- Share your entire relevant scripts in a code block rather than a screenshot, no need to share a file:
```csharp
// your copy/pasted code here
```
- Include any errors or warnings you encountered, along with their exact messages.
- Explain what you were trying to achieve.
- Describe what actually happened versus what you expected. (Doesn’t work, is not a good description)
- List any troubleshooting steps you’ve already attempted.
- Provide steps to reproduce the problem, if possible.
This makes your question clearer and shows that you respect others’ time:
- Using a code block lets people easily copy and test your script instead of retyping it.
- Sharing the full script allows them to run it on their own machines.
- Providing the exact error message (if any) helps identify the issue more efficiently.
- Clearly stating your goal prevents guesswork about what you’re trying to accomplish.
- Describing what actually happened (rather than just what you expected) helps them reproduce the issue.
- Sharing what you’ve already tried prevents them from wasting time on the same solutions.
- Overall, clear and complete information saves everyone from playing “20 questions” just to understand your problem.