Skip to content

Commit e817d85

Browse files
author
Stewart Miles
committed
Worked around null PluginImporter being returned by some assets.
In Unity 2018.4.13 AssetImporter.GetAtPath() is returning null for some assets in the project. This works around the issue by not inspecting importer state for assets without a PluginImporter. Change-Id: I4e8e2d0f3ce04997f716305ce1d9ebed36e8739f
1 parent c5ffeb6 commit e817d85

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/VersionHandlerImpl/src/VersionHandlerImpl.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,6 +1013,9 @@ public bool EnableMostRecentPlugins(HashSet<string> disableFiles) {
10131013
} catch (InvalidCastException) {
10141014
continue;
10151015
}
1016+
if (pluginImporter == null) {
1017+
continue;
1018+
}
10161019
bool editorEnabled = metadata.GetEditorEnabled();
10171020
var selectedTargets = metadata.GetBuildTargets();
10181021
var hasBuildTargets = metadata.GetBuildTargetsSpecified();

0 commit comments

Comments
 (0)