modular-avatar/Packages/net.fushizen.modular-avatar/Editor/Inspector/ZeroIndentScope.cs

21 lines
433 B
C#
Raw Normal View History

2022-10-20 10:42:33 +08:00
using System;
using UnityEditor;
namespace net.fushizen.modular_avatar.core.editor
{
public class ZeroIndentScope : IDisposable
{
private int oldIndentLevel;
public ZeroIndentScope()
{
oldIndentLevel = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
}
public void Dispose()
{
EditorGUI.indentLevel = oldIndentLevel;
}
}
}