Given the following sample Code, I this error on iOS:> ExecutionEngineException: Attempting to JIT compile method 'TestBehaviour/Test:Run (int)' while running with --aot-only.
Code:
public class TestBehaviour : MonoBehaviour
{
abstract class BaseTest
{
public abstract void Run(T something);
}
class Test : BaseTest
{
public override void Run(T something)
{
}
}
void Start()
{
BaseTest test = new Test();
test.Run(42);
test.Run("42");
}
}
What is the best workaround to get this working on Unity 5? (5.2.2p4)
What is the best way to refactor the above code to make it work?
I am aware of the limitations of Unitys Mono version and AOT compile. I just search around the Web for hours just to try out advices that won't work (Maybe due to recent Unity updates). So I opened this post to gather the latest advice for the most recent Unity version.
↧