1.0.2: Fixed issue, where PrefabStage no longer was marked as experimental in Unity 2021
This commit is contained in:
parent
e5896086b5
commit
e1d2deb4c5
|
|
@ -1,11 +1,16 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEditor.Experimental.SceneManagement;
|
|
||||||
using UnityEditorInternal;
|
using UnityEditorInternal;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UTools = UnityEditor.Tools;
|
using UTools = UnityEditor.Tools;
|
||||||
|
|
||||||
|
#if UNITY_2021_1_OR_NEWER
|
||||||
|
using UnityEditor.SceneManagement;
|
||||||
|
#else
|
||||||
|
using UnityEditor.Experimental.SceneManagement;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Module.NavigationTool.Editor.Tools
|
namespace Module.NavigationTool.Editor.Tools
|
||||||
{
|
{
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
|
|
@ -22,7 +27,7 @@ namespace Module.NavigationTool.Editor.Tools
|
||||||
{
|
{
|
||||||
if (!IS_DIRTY)
|
if (!IS_DIRTY)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PrefabStage prefabStage = PrefabStageUtility.GetCurrentPrefabStage();
|
PrefabStage prefabStage = PrefabStageUtility.GetCurrentPrefabStage();
|
||||||
Canvas[] canvases = prefabStage != null ? prefabStage.prefabContentsRoot.GetComponentsInParent<Canvas>() : Object.FindObjectsOfType<Canvas>();
|
Canvas[] canvases = prefabStage != null ? prefabStage.prefabContentsRoot.GetComponentsInParent<Canvas>() : Object.FindObjectsOfType<Canvas>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "com.module.navigationtool",
|
"name": "com.module.navigationtool",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"displayName": "Module.NavigationTool",
|
"displayName": "Module.NavigationTool",
|
||||||
"description": "Support for navigation tools, like favorites, history and toolbars",
|
"description": "Support for navigation tools, like favorites, history and toolbars",
|
||||||
"unity": "2019.2",
|
"unity": "2019.2",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue