public void SetDetailResolution(int detailResolution, int resolutionPerPatch)
{
if (detailResolution < 0)
{
Debug.LogWarning("detailResolution must not be negative.");
detailResolution = 0;
}
if ((resolutionPerPatch < kMinimumDetailResolutionPerPatch) || (resolutionPerPatch > kMaximumDetailResolutionPerPatch))
{
Debug.LogWarning(string.Concat(new object[] { "resolutionPerPatch is clamped to the range of [", kMinimumDetailResolutionPerPatch, ", ", kMaximumDetailResolutionPerPatch, "]." }));
resolutionPerPatch = Math.Min(kMaximumDetailResolutionPerPatch, Math.Max(resolutionPerPatch, kMinimumDetailResolutionPerPatch));
}
int num = detailResolution / resolutionPerPatch;
if (num > kMaximumDetailPatchCount)
{
Debug.LogWarning("Patch count (detailResolution / resolutionPerPatch) is clamped to the range of [0, " + kMaximumDetailPatchCount + "].");
num = Math.Min(kMaximumDetailPatchCount, Math.Max(num, 0));
}
this.Internal_SetDetailResolution(num, resolutionPerPatch);
}