Hi,
I found today in my project that RuntimeInitializeOnLoadMethod inside #if UNITY_IOS && !UNITY_EDITOR on IOS was not working when.
Platform IOS
XCode 9.4
Unity 2017.4.6f1 LTS
So this code showed nothing:
public static class MyStaticClass
{
#if UNITY_IOS && !UNITY_EDITOR
[RuntimeInitializeOnLoadMethod]
private static void Initialize()
{
Debug.Log("Init on load");
}
#endif
}
And this printed message as it was supposed to
public static class MyStaticClass
{
[RuntimeInitializeOnLoadMethod]
private static void Initialize()
{
#if UNITY_IOS && !UNITY_EDITOR
Debug.Log("Init on load");
#endif
}
}
I believe this is not expected behavior. Am I missing something?