From a319bdfc90d801512d80ef6299479496d8a8e6fb Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Thu, 30 Jul 2026 22:14:01 -0500 Subject: [PATCH] Simplify location. --- Source/Engine/Engine/NativeInterop.Unmanaged.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/Engine/Engine/NativeInterop.Unmanaged.cs b/Source/Engine/Engine/NativeInterop.Unmanaged.cs index 7decdcffc..cb8688dcf 100644 --- a/Source/Engine/Engine/NativeInterop.Unmanaged.cs +++ b/Source/Engine/Engine/NativeInterop.Unmanaged.cs @@ -1007,15 +1007,13 @@ namespace FlaxEngine.Interop scriptingAssemblyLoadContext = new AssemblyLoadContext("Flax", isCollectible: true); scriptingAssemblyLoadContext.Resolving += OnScriptingAssemblyLoadContextResolving; + + // Load Microsoft.CSharp assembly into collectible ALC for dynamic binder support + scriptingAssemblyLoadContext.LoadFromAssemblyPath(typeof(Microsoft.CSharp.RuntimeBinder.Binder).Assembly.Location); #else 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]