//------------------------------------------------------------------------- public void AssignValuesFromColliderGroup(AlphaMeshCollider target, ColliderGroup colliderGroup) { target.RegionIndependentParams = colliderGroup.mRegionIndependentParameters; target.IslandRegionParams = colliderGroup.mIslandRegionParameters; target.SeaRegionParams = colliderGroup.mSeaRegionParameters; target.GeneratedColliderData = colliderGroup.mGeneratedColliderData; target.CorrectColliderTypeToParameters(); target.ColliderMeshes = colliderGroup.mColliderMeshes; // sets the sharedMesh to null first, so no need to set it here. #if UNITY_4_3_AND_LATER target.ReassignCollidersIfNeeded(); #endif }
//------------------------------------------------------------------------- public void AssignValuesFromColliderGroup(AlphaMeshCollider target, ColliderGroup colliderGroup) { target.RegionIndependentParams = colliderGroup.mRegionIndependentParameters; target.IslandRegionParams = colliderGroup.mIslandRegionParameters; target.SeaRegionParams = colliderGroup.mSeaRegionParameters; target.GeneratedColliderData = colliderGroup.mGeneratedColliderData; target.CorrectColliderTypeToParameters(); target.ColliderMeshes = colliderGroup.mColliderMeshes; // sets the sharedMesh to null first, so no need to set it here. #if UNITY_4_3_AND_LATER target.ReassignCollidersIfNeeded(); #endif }