Fix JsonAsset instantiation after script reload

This commit is contained in:
2022-11-27 14:47:02 +02:00
parent 76ee695a59
commit 2227642c13

View File

@@ -36,7 +36,10 @@ namespace FlaxEngine
var dataTypeName = DataTypeName;
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
for (int i = 0; i < assemblies.Length; i++)
// Going through the assemblies in order will return collected assemblies first,
// use reverse order instead to find the type currently loaded assemblies instead.
for (int i = assemblies.Length-1; i >= 0; i--)
{
var assembly = assemblies[i];
if (assembly != null)