[BUG] Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown

When inspecting the astar path script, it throws this error:

ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
System.Reflection.Assembly.GetTypes () (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
Pathfinding.AstarPathEditor.FindGraphTypes () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:1422)
Pathfinding.AstarPathEditor.OnEnable () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:85)

Hey,

I’ve come across this myself also (should have probably made a topic about it)

Temp fix is to unload the scene and reload it.

Hi

Which version are you using? I think this bug should be fixed in more recent versions. Try to download the latest version from here: https://www.arongranberg.com/astar/download

I saw this last I think in 4.2.4, ill update the topic if encountered again, (I’m on 4.2.7)

From the 4.2.5 changelog:

  • Fixed exceptions could be thrown if the project contains some assemblies that can for some reason not be read.

Oooh is the version on the asset store not the newest version? I’ve been having issues with getting the newest download for some reason.
EDIT: Never mind, I get it now! I didn’t see where I can type in my invoice number. That’s a really cool way of designing that!
EDIT2: I updated and the issue still seems to pop up :frowning: Luckily if I select something else then go back, I can inspect it, so it’s still usable :))

Hi

Hm… Do you think you could post the full stacktrace when it happens in the new version?

ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
System.Reflection.Assembly.GetTypes () (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
Pathfinding.AstarPathEditor.FindGraphTypes () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:1422)
Pathfinding.AstarPathEditor.OnEnable () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:85)

Ah. I had forgot to apply the same fix to the editor code. I have fixed this now and the fix will be included in the next update.

1 Like