//------------------------------------------------------------------------- public void AssignValuesFromColliderGroup(AlphaMeshCollider target, ColliderGroup colliderGroup) { target.RegionIndependentParams = colliderGroup.mRegionIndependentParameters; target.AssignAnimatedColliderParamsFromOther(colliderGroup.mAnimatedColliderParameters); 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.UpdateSyncToParentSpriteRenderer(); target.ReassignCollidersIfNeeded(); #endif target.UpdateColliderComponentValues(); }
//------------------------------------------------------------------------- public void UpdateColliderComponentValues(AlphaMeshCollider target) { target.UpdateColliderComponentValues(); UpdateSimilarCollidersAndGroupToTarget(target); }