SoftMaskForUGUI/Scripts/Editor/Utils.cs

20 lines
523 B
C#
Raw Normal View History

2019-05-13 22:35:42 +08:00
using UnityEditor.Experimental.SceneManagement;
using UnityEditor.SceneManagement;
namespace Coffee.UIExtensions.Editors
{
public static class Utils
{
public static void MarkPrefabDirty ()
{
#if UNITY_2018_3_OR_NEWER
var prefabStage = PrefabStageUtility.GetCurrentPrefabStage ();
if (prefabStage != null)
{
EditorSceneManager.MarkSceneDirty (prefabStage.scene);
}
#endif
}
}
}