Skip to content

Commit

Permalink
fix: null reference error since r9682904
Browse files Browse the repository at this point in the history
  • Loading branch information
favoyang committed May 15, 2021
1 parent 914eb75 commit 777a3ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Editor/AddressableImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAsse
// Apply import rules.
var prefabStage = PrefabStageUtility.GetCurrentPrefabStage();
#if UNITY_2020_1_OR_NEWER
string prefabAssetPath = prefabStage.assetPath;
string prefabAssetPath = prefabStage != null ? prefabStage.assetPath : null;
#else
string prefabAssetPath = prefabStage.prefabAssetPath;
string prefabAssetPath = prefabStage != null ? prefabStage.prefabAssetPath : null;
#endif
foreach (var importedAsset in importedAssets)
{
Expand Down

0 comments on commit 777a3ca

Please sign in to comment.