Repository URL to install this package:
|
Version:
1.3.2 ▾
|
using UnityEditor;
using UnityEngine;
namespace Fluctio.FluctioSim.EditorUtils.Gui
{
public class LabelWidthScope : GUI.Scope
{
private readonly float _originalWidth;
public LabelWidthScope(float newWidth)
{
_originalWidth = EditorGUIUtility.labelWidth;
EditorGUIUtility.labelWidth = newWidth;
}
protected override void CloseScope()
{
EditorGUIUtility.labelWidth = _originalWidth;
}
}
}