modular-avatar/Editor/Inspector/ZeroIndentScope.cs

21 lines
433 B
C#
Raw Normal View History

2022-10-19 19:42:33 -07:00
using System;
using UnityEditor;
2022-11-10 20:39:58 -08:00
namespace nadena.dev.modular_avatar.core.editor
2022-10-19 19:42:33 -07:00
{
internal class ZeroIndentScope : IDisposable
2022-10-19 19:42:33 -07:00
{
private int oldIndentLevel;
public ZeroIndentScope()
{
oldIndentLevel = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
}
public void Dispose()
{
EditorGUI.indentLevel = oldIndentLevel;
}
}
}