Search Issue Tracker
Fixed in 2017.2.X
Votes
0
Found in
5.6.0f3
Issue ID
898787
Regression
No
BoxCollider Size values get multiplied by 2 when using EditorJsonUtility::FromJsonOverwrite
When using "UnityEditor.EditorJsonUtility.FromJsonOverwrite" with a BoxCollider, the Size values of the BoxCollider component get twice as big than they should be. For example, if the size is (1, 2, 3), when calling "UnityEditor.EditorJsonUtility.FromJsonOverwrite" they will become (2, 4, 6), no matter what the values are after calling "UnityEditor.EditorJsonUtility.ToJson"; calling it again will result in (4, 8, 12), and so on.
To reproduce:
1. Open the attached project
2. Open the "Test" scene
3. Select the "GameObject" from the Hierarchy
4. Click "Click To Serialize" checkbox in the Inspector in the "Test" script
5. Click "Click To Deserialize" checkbox in the Inspector in the "Test" script
Desired outcome: The Size values of the BoxCollider component are left unchanged.
Actual result: The Size values of the BoxCollider component appear twice as big than they should be. (view the attached .gif)
Workaround: Adjust Size values by dividing them by 2 after calling the EditorJsonUtility::FromJsonOverwrite
Reproduced with 5.5.2f1, 5.5.3p1, 5.6.0b3, 5.6.0f3, 2017.1.0b1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on when D3D12RenderPass::SetupDeviceResources when opening FBX animation preview
- Serialization errors are thrown when "com.unity.render-pipelines.core" is added as a custom package and Graphics window is opened
- Character Joints unexpectedly rotate when a ragdoll is created using the Ragdoll Wizard
- Crash on GfxDeviceD3D11Base::DrawBuffersBatchMode when rendering the Scene view
- The shared EditorBuildSettings.asset file of symlinked projects is not updated when changing the order of the Scenes in Build Settings in one of the projects
Add comment