Does transform.LocalScale now use the GPU? Is it still slow on phones?

The manual still warns against scaling objects and suggests they be scaled in the external modeler, imported at 1.0 and
left there or performance will suffer. Ok, what about things that need to get bigger and smaller to varying degrees in the game?
I read a post from last year from a Unity person that they were ‘working on it’. I see Aras said that in Version 3.0, it will use the GPU, but that was from before it came out. So… does it? I’ve just got to the point in my game where I need to make things scale, and it already chugs in the webplayer at 1024x768 resolution, and I can’t afford the profiler, so freaking out a bit over this.

I was actually thinking of making a vertex shader to do my in-game scaling, but if that’s essentially what the engine is doing now, I won’t waste the time on it. (My first thought was that I could make a hundred or so versions of the mesh at different sizes and switch them on and off every few frames like a flip book; and could that really be faster than just setting the scale, and if so; wtf. )

So, is just setting transform.localscale good & kosher now in 3.0 or is some workaround still needed?

Scaling object is not a problem in my experience. The only case that I’m concerned about is having a Collider on scaled object, because in that case it has to rebuild collider everytime you change your scale.

Otherwise just try it and see if it works.

I ran into a similar problem. The slowdown issue is not the GameObject itself which you want to rescale, but its collider. Even if never using the collider, it is actually there and will be updated with a call to transform.localScale resulting in a more complex scaling.

The collider is used for physics and collision detection, if you do not need this, the solution is quite simple - just destroy the collider of your GameObject.

GameObject.Destroy ( myGameObjectrenderer.collider );

Happy Scaling!

Unity 3.0 does have GPU support for uniform scaling for mesh renderers. However, non-uniform scaling (different values for x/y/z), and colliders with scaling will still cause performance hits.