private TextGenerationSettings ValidatedSettings(TextGenerationSettings settings)
{
if ((settings.font == null) || !settings.font.dynamic)
{
if ((settings.fontSize != 0) || (settings.fontStyle != FontStyle.Normal))
{
if (settings.font != null)
{
object[] args = new object[] { settings.font.name };
Debug.LogWarningFormat(settings.font, "Font size and style overrides are only supported for dynamic fonts. Font '{0}' is not dynamic.", args);
}
settings.fontSize = 0;
settings.fontStyle = FontStyle.Normal;
}
if (settings.resizeTextForBestFit)
{
if (settings.font != null)
{
object[] objArray2 = new object[] { settings.font.name };
Debug.LogWarningFormat(settings.font, "BestFit is only supported for dynamic fonts. Font '{0}' is not dynamic.", objArray2);
}
settings.resizeTextForBestFit = false;
}
}
return settings;
}