Skip to content

Commit dfb8541

Browse files
committed
Fixed compiler errors on 2021.2 and later
1 parent 4b14628 commit dfb8541

5 files changed

Lines changed: 11 additions & 5 deletions

File tree

Plugins/AssetUsageDetector/Editor/AssetUsageDetector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
using System.IO;
1111
using System.Text;
1212
using Object = UnityEngine.Object;
13-
#if UNITY_2018_3_OR_NEWER
13+
#if UNITY_2018_3_OR_NEWER && !UNITY_2021_2_OR_NEWER
1414
using PrefabStage = UnityEditor.Experimental.SceneManagement.PrefabStage;
1515
using PrefabStageUtility = UnityEditor.Experimental.SceneManagement.PrefabStageUtility;
1616
#endif

Plugins/AssetUsageDetector/Editor/AssetUsageDetectorWindow.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
using System.Collections.Generic;
66
using System.Reflection;
77
using Object = UnityEngine.Object;
8-
#if UNITY_2018_3_OR_NEWER
8+
#if UNITY_2021_2_OR_NEWER
9+
using PrefabStage = UnityEditor.SceneManagement.PrefabStage;
10+
using PrefabStageUtility = UnityEditor.SceneManagement.PrefabStageUtility;
11+
#elif UNITY_2018_3_OR_NEWER
912
using PrefabStage = UnityEditor.Experimental.SceneManagement.PrefabStage;
1013
using PrefabStageUtility = UnityEditor.Experimental.SceneManagement.PrefabStageUtility;
1114
#endif

Plugins/AssetUsageDetector/Editor/SearchResultTreeView.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
using UnityEditor;
66
using UnityEditor.IMGUI.Controls;
77
using UnityEngine;
8-
#if UNITY_2018_3_OR_NEWER
8+
#if UNITY_2021_2_OR_NEWER
9+
using PrefabStage = UnityEditor.SceneManagement.PrefabStage;
10+
using PrefabStageUtility = UnityEditor.SceneManagement.PrefabStageUtility;
11+
#elif UNITY_2018_3_OR_NEWER
912
using PrefabStage = UnityEditor.Experimental.SceneManagement.PrefabStage;
1013
using PrefabStageUtility = UnityEditor.Experimental.SceneManagement.PrefabStageUtility;
1114
#endif

Plugins/AssetUsageDetector/Editor/Utilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
using UnityEngine;
1111
using UnityEngine.SceneManagement;
1212
using Object = UnityEngine.Object;
13-
#if UNITY_2018_3_OR_NEWER
13+
#if UNITY_2018_3_OR_NEWER && !UNITY_2021_2_OR_NEWER
1414
using PrefabStage = UnityEditor.Experimental.SceneManagement.PrefabStage;
1515
using PrefabStageUtility = UnityEditor.Experimental.SceneManagement.PrefabStageUtility;
1616
#endif

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.yasirkula.assetusagedetector",
33
"displayName": "Asset Usage Detector",
4-
"version": "2.2.0",
4+
"version": "2.2.1",
55
"documentationUrl": "https://github.com/yasirkula/UnityAssetUsageDetector",
66
"changelogUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/releases",
77
"licensesUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/blob/master/LICENSE.txt",

0 commit comments

Comments
 (0)