Why are my animations not played? I can interact with the cuppboard but it wont play the animations.
D1 has a Door1 Script since it has its own open and close animations
D2 has a Door2 Script since it also has its own open and close animations
Both of theese scripts send Triggers to the animator, which is in the parent “Cuppboard FBX”. This is the only object with a Animation controller component. The File was imported from Blender and all Animations seem to work, also in the Animator. However they just dont execute in game.
Only consider the code AFTER you have done this critical step:
Always start with the Animator state machine and prove it works in isolation, no code at all.
Here’s more reading:
Once you prove the animator is set up properly, if the code doesn’t work, that just means you wrote a bug… and that means… time to start debugging!
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.
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.
I disagree.
If the answer is satisfactory and helpful after asking a question, reporting it would be a good feedback for others who encounter this issue. Not coming back to the topic after asking a question would make it a sterile topic for those who encounter the same issue.