SoftMaskForUGUI/Scripts/Editor/Utils.cs

22 lines
556 B
C#
Raw Normal View History

2019-07-23 01:11:16 +08:00
#if UNITY_2018_3_OR_NEWER
2019-05-13 22:35:42 +08:00
using UnityEditor.Experimental.SceneManagement;
2019-07-23 01:11:16 +08:00
#endif
2019-05-13 22:35:42 +08:00
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
}
}
}