Move to better method location.

This commit is contained in:
2026-07-30 22:12:05 -05:00
parent 04d0608e60
commit b0ba936ebe
2 changed files with 5 additions and 3 deletions
@@ -1011,6 +1011,11 @@ namespace FlaxEngine.Interop
scriptingAssemblyLoadContext = new AssemblyLoadContext("Flax", isCollectible: false);
#endif
DelegateHelpers.InitMethods();
#if FLAX_EDITOR
// Load Microsoft.CSharp assembly into collectible ALC for dynamic binder support
scriptingAssemblyLoadContext.LoadFromAssemblyPath(typeof(Microsoft.CSharp.RuntimeBinder.Binder).Assembly.Location);
#endif
}
[UnmanagedCallersOnly]
-3
View File
@@ -1758,9 +1758,6 @@ namespace FlaxEngine.Interop
assembly.GetType("System.Linq.Expressions.Compiler.DelegateHelpers")
.GetMethod("MakeNewCustomDelegate", BindingFlags.NonPublic | BindingFlags.Static).CreateDelegate<Func<Type[], Type>>();
// Load Microsoft.CSharp assembly into collectible ALC for dynamic binder support
scriptingAssemblyLoadContext.LoadFromAssemblyPath(typeof(Microsoft.CSharp.RuntimeBinder.Binder).Assembly.Location);
// Create dummy delegates to force the dynamic Snippets assembly to be loaded in correcet ALCs
MakeNewCustomDelegateFunc(new[] { typeof(void) });
{