playtest-unity/playtest/Library/PackageCache/com.unity.timeline@1.7.4/Editor/Utilities/Scopes/GUIMixedValueScope.cs

21 lines
424 B
C#
Raw Normal View History

2023-06-19 23:21:21 -04:00
using System;
using UnityEngine;
namespace UnityEditor
{
struct GUIMixedValueScope : IDisposable
{
readonly bool m_PrevValue;
public GUIMixedValueScope(bool newValue)
{
m_PrevValue = EditorGUI.showMixedValue;
EditorGUI.showMixedValue = newValue;
}
public void Dispose()
{
EditorGUI.showMixedValue = m_PrevValue;
}
}
}