Hey, We are developing a pretty big project for some time, and we upgraded to Unity 5.3.1p1 (because of the particles bug we went to the patch version), and everything was working normally on the Editor... however when we made a new build for iOS, for reasons I cannot even begin to comprehend, our units have "random" scale values... from tiny to super ultra huge... Considering we havent changed a thing about animations in the project for the past... wow I dont even know, 6 months, this is certainly something related to the new Unity version, was working fine on Unity 5.2.x, and just bugs on the device, doesnt bug on the editor. Its strange because even 2 instances of the same unit have different scales, and depending to where they move... if they are moving attacking or simply doing nothing, their scales vary greatly. And whats more mystical is that the size changes are smooth... so a unit might be very small and move around a little bit and it gradually grows to super huge in a couple seconds... then comes back to its original scale... and we dont even scale the units, they all should be scale 1,1,1 for batching purposes. Anyway... I dont know what is happening. Apparently, if we remove the Optimize option on the RIG of the unit, this normalizes but then again we dont want to remove the optimization. Our game has tons of units at the same time on screen, its a mobile game, and having all the bones moving around will certainly slow down our game. So... anyone else with this issue? PS: Heres a screenshot to illustrate... all those... blue monsters, and the skeleton, should be exactly the same size... they are just the model dragged to the scene, no code controlling them at all, and they just stand there on Idle... which proves its not code related neither animation related.
I can confirm that when Optimize Game Objects is enabled, weird scaling occurs. Disabling it fixes the problem. There is no problem in the editor, but when run on iOS(only tested on this for now) the problem occurs. Unity versions: 5.3.1f1 and 5.3.1p1.
There also seems to be strange translation issues when rotating with Optimize Game Objects, as detailed below. http://forum.unity3d.com/threads/5-...objects-creates-translation-on-mobile.378172/
Soooo... should I start removing the "optimize" option or is this getting fixed soon? Edit: Dont mean to be rude... I ask because its going to be a ton of work to remove optimize from about a hundred of units, and then when its fixed I will have to put it back to a hundred units... so rather not have to do it.
Submitting a bug is the only way to confirm Unity is aware of, tracking and actively working on a fix.
As far as the rotate bug I encountered (likely related to this scale bug), a bug report has already been filed along with a project reproducing the issue. In fact two bug submissions were made after I figured the tool that comes with Unity is a better way to do it. =P
Hello everyone, we are facing the same problem right now. At least the effect is the same. But we noticed that not the scale of the animated objects changes. Its the transform.postion that changes in a weird way (it seems like just the Y-Axis is effected). The scaling effect just occur because of the fact that the object moves toward the main camera. We using a MeshAgent (for movement) and custom rotation (for aiming). Unit <- MeshAgent + UnitController --- CharModel <- Rig + Animation --- UI <- InGame HUD The UI stays always on the "right" position (moves probably to the expected positions etc.), but the CharModel changes the position in a random way (but smoothly like it's animated). Here an example of an Unit that is moved to the exact same position (in Editor vs. Mobile): Editor: pos = (2.3, 0.1, -2.5), localPos = (0.0, 0.1, 0.0), rot = (-0.2, 0.1, 0.6, -0.7), localScale = (1.0, 1.0, 1.0), parentLocalScale = (1.0, 1.0, 1.0) Mobile (Android in this case): pos = (2.3, -0.9, -2.5), localPos = (0.0, -0.9, 0.0), rot = (0.1, 0.2, -0.7, -0.6), localScale = (1.0, 1.0, 1.0), parentLocalScale = (1.0, 1.0, 1.0) (Data read from "CharModel"; so the parent is "Unit") It's noticeable that the position and rotation is different. The rotation is just different because our Unit is facing the opponent Unit (to shoot at). So because of the different positions we have a different rotation. However the position seems to be just slightly different, but we are using a small scale for our world. So even this slightly difference makes a "huge" difference. Since the Y-Axis is negative our Unit is under the ground Plane and hidden. We tried many things to fix this, but we are running out of options. "Optimize Game Object" was one of our tries. Didn't work for us. Maybe we are facing a different Problem here, but at least the effect and the context seems to be the same. The problem occurred with Unity 5.3+. We hadn't any problems with Unity 5.2.3f1. Thanks a lot guys and best regards, Tom
This seems to me like a pretty important bug... I was forced to go back a version to have my game working properly again... and as people mentioned I also submitted a bug report. Lets hope it gets fixed soon, as the recent patch mentions nothing about this =/
We too, have rolled back to 5.2.4. It'd be nice to get some acknowledgement on this-- it seems Optimize Game Objects is broken in a plethora of ways. This is only one among three different threads on it in the last week.
Hey, just wanted to update you all that I received an e-mail informing me this bug has been solved for Unity 5.4, so hang in there!
Hm.... apparently even 5.3.3 and 5.3.4 are working alright for whatever the bug was in our project, its solved. Havent tried the 5.4 yet
And you're still using the option Optimize Game Objects in the inspector? Because we still have a problem if we use this option. We also checked the version 5.3.3 and 5.3.4 - without results
I found a description of the bug, maybe someone wants to vote https://issuetracker.unity3d.com/is...enabled-leads-to-incorrect-gameobject-scaling