Question by
harrisonmg · Nov 03, 2021 at 02:38 AM ·
buildattribute
RuntimeInitializeOnLoadMethod runs in editor, not in builds
I have one method with the RuntimeInitializeOnLoadMethod
attribute that initializes the base aspects of my game - it runs fine in the editor but refuses to run in builds. Here's a minimal example:
using UnityEngine;
public static class Starter
{
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
private static void Load()
{
Crash(0);
}
private static void Crash(int i)
{
Crash(++i);
}
}
I've already tried various RuntimeInitializeLoadType
s. Any help or suggestions would be greatly appreciated!
Comment
Your answer

Follow this Question
Related Questions
Why iOS Build is more bigger than Android? 0 Answers
Is there a way to reveal resources in the built folder structure? 0 Answers
My windows standalone build doesn't work at all. 1 Answer
Xcode 7.2/Unity Linker command error exit code 1 1 Answer
AppCallbacks constructor throws FileNotFound exception and then crashes W10mobile 1 Answer