- Home /
Unity not building used assets
In my project i have a player with shooting and running animations. When i build my project to the android platform unity doesn't include those animations. The player gets loaded in the scene when it is starting.
I "Fixed" the problem by placing the character model in the scene with its animations.
Though this is just to work around the problem and not actaully fixing it. I would like to know why this is happening and how i can fix this properly :)
EDIT:
It isn't just animations. it also just happend with a texture. in the game was an emeny without a texture and everything else about it was just working fine.
Edit2 After researching for a while i think it has something to do with the error i am getting when building. and i think it is related to this issue.
Do you have your animation controller setup correctly for the character and listed in the animation component list for your character in the inspector.
Yes i have. also i forgot to mention that it worked this way for like 15 weeks until now
Has it been working on android for 15 weeks or PC. Is it your first time trying this scene on android.
Did you change anything before this problem occurred that you think has affected it.
No it worked for android all those weeks and i'm not working on major parts of the game now, meaning i ddin't change anything that could affect that (to my knowledge).
It just happend with a texture :/ now there was a enemy model without a texture and it was listed in the unused assets
Cant get a clue. If possible take a backup and try reversing the changes and backtrack to the point if possible.
Answer by fffMalzbier · Jul 31, 2014 at 01:10 PM
Be sure that everything you like to use in your game have to be referenced by the scene which like to use it , or you use the resources folder for loading them later.
Everything that is not referenced by a object in the scene will be stripped from the game to make it smaller / more performance.
Yes that is exactly what i have. I have the prefab in the resources folder. It loads the complete prefab except for the animations. I also started happening with other prefabs where this time the texture of that prefab was missing. everything else is there. This seems really strange to me.