Farming 2.0 Update - News (2024)

There's been a lot of drama around performance in the Unity 2019.3 update. When we first updated we saw a significant performance drop and an increase in memory usage. After some debugging we figured out that a new flag has been added to the mesh collider cooking options and unless you explicitly update all prefabs that were created on 2019.2 you will see a significant performance decrease.Not to worry we thought, we'll just set them to include all current and future flags by setting the bit mask to all 1s. This did improve performance, but it was still slower than 2019.2 so we decided not to include 2019.3 in last month's update. After further investigation we then rediscovered an old bug from way back in the 2018.3 beta. Something inside the engine seems to specifically check for the exact default flags. Setting it to any other bit mask (even if it includes the default flags) will cause everything to be a lot slower. So the solution ended up forcing the new default flags on all mesh colliders.

var oldDefaultFlags = (MeshColliderCookingOptions)(14); // 0111 00...

var fckDefaultFlags = (MeshColliderCookingOptions)(-1); // 1111 11...

var newDefaultFlags = (MeshColliderCookingOptions)(30); // 0111 10...

With these in place we are now seeing a significant performance increase in 2019.3 and we've even been told that the problem has been fixed in the 2020.1 beta and that the fix will be ported to 2019.3 at some point.

Farming 2.0 Update - News (1)

Unfortunately even with these fixes in place our high definition render pipeline branch is still slower than the legacy render pipeline, so there's quite a bit of work left to do both by us and by Unity before we can take the next step. That being said, upgrading to 2019.3 has been a major step in the right direction.

Farming 2.0 Update - News (2024)
Top Articles
Latest Posts
Article information

Author: Van Hayes

Last Updated:

Views: 5880

Rating: 4.6 / 5 (46 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Van Hayes

Birthday: 1994-06-07

Address: 2004 Kling Rapid, New Destiny, MT 64658-2367

Phone: +512425013758

Job: National Farming Director

Hobby: Reading, Polo, Genealogy, amateur radio, Scouting, Stand-up comedy, Cryptography

Introduction: My name is Van Hayes, I am a thankful, friendly, smiling, calm, powerful, fine, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.