9092858a58
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
27 lines
546 B
C#
27 lines
546 B
C#
using System;
|
|
|
|
using UnityEngine;
|
|
|
|
namespace Unity.PlasticSCM.Editor.UI
|
|
{
|
|
internal static class MeasureMaxWidth
|
|
{
|
|
internal static float ForTexts(GUIStyle style, params string[] texts)
|
|
{
|
|
float result = 0;
|
|
|
|
GUIContent content = new GUIContent();
|
|
|
|
foreach (string text in texts)
|
|
{
|
|
content.text = text;
|
|
|
|
result = Math.Max(result,
|
|
style.CalcSize(content).x);
|
|
}
|
|
|
|
return result + 10;
|
|
}
|
|
}
|
|
}
|