setting localScale of Transform work in Editor but not standalone

I have a GameObject which I need to scale. I put code in and it works as expected in the editor; the object scales and all child objects also scale correctly. I have built a windows standalone version and the scale does not work, however the child objects are being scaled as if the parent was being scaled correctly!

I have tried the following lines and none of them seem to scale my main object

Vector3 scale = new Vector3(1.0f, 1.0f, 2.0f);
PrimaryAttackObject.transform.localScale = scale;
PrimaryAttackObject.transform.root.localScale = scale;
PrimaryAttackObject.renderer.transform.localScale = scale;

I can confirm that the value of localScale is what I set it to upon the next Update() so nothing else can be changing the scale. I am using Unity 4.2.2f1

Does anyone have any ideas?
Thanks
Allan

Has nobody else experienced this? To check, I have ensured that my object is not static, and does not have optimize mesh ticked either. Still no joy :frowning:

I’m on 4.5.3 and seeing the same exact thing. Child objects are scaled correctly as if their parent were being scaled, but the parent stays fixed. Or sometimes child objects move as if their parent were scaled, but they don’t themselves scale. It only happens with a specific model I’ve imported.

One thing I have in common with your example is that we’re trying to set the scale to a non-isometric value. Maybe Unity has a bug with hierarchies involving such scale. When I try to set the scale to something like 2.0,2.0,2.0 it all works.

Edit: ha, after flipping every option on and off, turning on read/write for that specific model did the trick. I don’t know why I don’t have to do it for any other model, but there you go.