- Home /
Child prefab Scale on inspector becoming( 1,1,1) while playing
Hello guys, I am with a strange problem. As I always make, I create a empty object and put the animation prefab inside of it to make the object independent from the animation part. So this is working well, the parent prefab always have scale (1,1,1) and the animation I can change its parameters freely.
The problem is I am importing a cube from blender to unity. In the level editor it is ok, I change the scale to (50,100,100) and it seems fine. When I press the play button, this animation scale becomes (1,1,1) almost disappearing.
This object doesn`t have any script, it is just a square ground with a box collider on its parent, can some1 help me. Importing things to unity is harder than code :P
Answer by Kaze_Senshi · Mar 31, 2012 at 02:30 AM
Well, solved the problem putting the mesh inside of an empty object and scaling this object instead of mesh.
Answer by Peter G · Feb 13, 2012 at 02:20 AM
It sounds like you've identified your problem already. The animation itself doesn't have a scale, but the transform does. Animation objects store a number of things, but one of which is the Transform information. The transform includes the scale. The animation you have on your object probably includes keyframes setting the scale of the object.
The best fix is to create a copy of your file in Unity to edit with the built-in animation editor (Unity won't let you edit original files with the editor) Delete the scale curves and you should be free to scale it however you want.
Hi, well my cube does not have an animation, it is just a cube with a UV map that I want to make work like a ground. Anyway I openned the animation editor, in the Scale.x, Scale.y and Scale.z there is just a line with two points at 0.01 and 0.02 seconds, these points does not change the curve, so it is a straight line starting at (0.01, 0.01) and going to the right.
I can't select these points, so I think there is no curve because there is no animations. Any idea? Thanks for the answer.
Hmmmm, what's the animation that you mention in your explanation then. I must have misunderstood something.
The "animation" that I was saying is just the fbx imported to unity, I think that the correct word would be the "mesh", as the animations are inside of it.
Unfortunately, your ter$$anonymous$$ology is still not correct. Unity doesn't store any animation data in the mesh itself. The mesh stores the bone bindings, but that's it. Its up to the animation component to play the animations.
This sounds so much like an Animation problem I'm a little stumped. So there are no animation components on ANY of the game objects?
Ops, anyway the object that is having this problem has no animations. I realized that if I change the scale factor in the fbx importer inspector, the object size becomes O$$anonymous$$. But I really want to only change the scale in the object inspector. If you know something, let me know, thank you again.