Pending Review

How to load game properly?

Max Ivanchenko 3 years ago updated 3 years ago 4

Hi Everybody! May be this is a stupid question, but

- I made a small game and I see when loading (after unity splash screen) a black screen for 15-30 seconds. ( On any device!

- I've tried to do an empty first scene without Bolt elements just with code: SceneManager.LoadScene("Game"); or SceneManager.LoadSceneAsync("Game"); - didn't help.

- I suppose the Bolt are loading itself before Unity content, - is there any loading tips - how at least show the loading screen/image instead of just waiting?


Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

Hi Max,

Do you get that delay in the editor too, after entering play mode?

15-30 seconds seems way too long for any kind of Bolt initialization, especially in builds, so I'm not sure what could be happening. Can you link the profiler to your build and have a look at what the delay is?

Hi Lazlo

The problem is - the profiler starts to work only after this lag between unity splash and first scene - and then all is rather quick. I don't know how to see what's happening in that time!

this is 1 frame, but before it was 10 seconds on Xiaomi Redme 5!

+ this is Mono build! I've tried the l2cpp build and there this lag is small (3-4 seconds)! That's ok! But my game doesn't work in L2CPP mode(( .. I suppose there is problems with some blocks or logic which works differently on l2cpp mode. Is there any common cases for that? how to use bold in l2cpp mode?

Hi Max,

You can use Bolt with IL2CPP as long as you run AOT Pre-Build before: 


Other than that, from this profiler screenshot, it seems like Bolt's initialization takes less than 1/4th of your first frame time. PostProcessVolume takes a big chunk too. 

If you want, you can also try version 1.4.1, which is currently in Beta 2. It includes some major optimization boosts for instantiation and it might help with your loading times. This is still in beta, so make sure you backup your project beforehand though: https://ludiq.io/bolt/download/1.4.1b2

Hi Lazlo

AOT Pre-Build doesn't help me! - in the l2CPP - state machines and flows just don't fire for me(( .. in Mono all works fine! No errors or special warnings with l2cpp.

I'm trying to install 1.4.1 beta as you said but have faced with another problem: MissingMethodException: Method not found: 'Bolt.Flow.SetValue'.  I've found on forums similar problem with Rewired plugin, but I don't have it. Anyway - I've updated and then even delete almost all plugins just to test - and anyway this error is still there! I've tested 2018.3... Rebuild and redo the AOTStubs doesn't help too... I just can't migrate!


full error:

MissingMethodException: Method not found: 'Bolt.Flow.SetValue'.
Bolt.EventUnit`1[Bolt.EmptyEventArgs].Trigger (Ludiq.GraphReference reference, EmptyEventArgs args)
Bolt.EventUnit`1+<>c__DisplayClass14_0[Bolt.EmptyEventArgs].b__0 (EmptyEventArgs args)
Bolt.EventBus.Trigger[EmptyEventArgs] (EventHook hook, EmptyEventArgs args)
Bolt.EventMachine`2[Bolt.FlowGraph,Bolt.FlowMacro].TriggerRegisteredEvent[EmptyEventArgs] (EventHook hook, EmptyEventArgs args)
Bolt.EventMachine`2[TGraph,TMacro].TriggerEvent (System.String name)
Bolt.EventMachine`2[TGraph,TMacro].Update ()