Property SupportsRuntimeCompilation
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
SupportsRuntimeCompilation
Whether this runtime can load and run code compiled at runtime.
The C# compiler is not the obstacle: Roslyn writes the PE image in managed code, and nothing here uses
Reflection.Emit. What fails is the load - Assembly.Load(byte[]) has nowhere to go on an
ahead-of-time runtime, because there is no JIT to turn the fresh IL into machine code. That is IL2CPP
(WebGL, iOS, and an IL2CPP desktop player), where the same wall also stops
AddComponent(type): the type only exists inside that assembly.
Probed rather than guessed from the platform name: creating a DynamicMethod and binding it to a delegate is exactly the capability in question, and it costs microseconds once.
public static bool SupportsRuntimeCompilation { get; }