//------------------------------------------------------------------------- public void AssignValuesFromColliderGroup(AlphaMeshCollider target, ColliderGroup colliderGroup) { target.RegionIndependentParams = colliderGroup.mRegionIndependentParameters; target.ColliderRegionParams = colliderGroup.mColliderRegionParameters; target.ColliderRegions = colliderGroup.mColliderRegions; target.OutlineAlgorithm = colliderGroup.mOutlineAlgorithm; target.CorrectColliderTypeToParameters(); target.ColliderMesh = colliderGroup.mColliderMesh; // sets the sharedMesh to null first, so no need to set it here. #if UNITY_4_3_AND_LATER target.ReassignPolygonCollider2DDataIfNeeded(); #endif }