Hello, and I hope my first question here hasn’t been answered in a million places, I have been looking all day.
I have a project that instantiates a prefab (sol1) through a script using this code.
var sol1 : Transform;
var a1s = Instantiate(sol1, Vector3(0, 0, 0), Quaternion.identity);
This code was directly lifted from another project and works famously, but when used in this project the prefab is instantiated with the wrong scale, usually 0.999999 something on all axis. This does not happen in any of my other projects, where prefab scale is simply carried over into the scene. I don’t understand why this happens here. Also, trying to access the scale to change it after it is instantiated has no effect. I have tried instantiating it to the position and rotation of an empty, but it is the same. It seems everything does what it is supposed to, except it refuses to keep the prefab scale and let me access the scale after the object is spawned. I have also tried this with two versions of the prefab, one off the project list and one out of the scene itself, with no difference. Bringing in and using a prefab that worked in a separate project with this code resulted in two out of three axis over-scaling incorrectly with the third scaled down to 1.
I am unbelievably lost in what looks to me like random behavior in Unity and I have no idea what to try next beyond just scrapping it and starting over. Please help!
-Brother B
I found the problem, and I feel like such a moron. The problem is with Blender 2.61, not Unity. I tried all sorts of ways to modify and re-export the objects with no luck. I opened a new Blend file, made a new object from scratch, and exported it into the project. It too had the scaling problem. Finally, I gave up, and as a last ditch attempt I re-opened my original model in Blender 2.59 instead of 2.61 and exported it one last time, this stopped the forced rescaling.
I’m really happy to know I’m not crazy and I would like to say that I LOVE Unity and was perfectly willing to do what it takes to work around this if necessary. Thanks, everyone, for helping out.
-Brother B.