YellowCartridge said:
But I'm asking: when Unreal Engine loads it? At start of game or during the first spawn? I want to elliminate every access to filesystem during runtime to prevent game thread freezing. I want to load everything on the game start and use only preloaded data at runtime. How to do it?
In that scenario you're working against the way the engine works.
You shouldn't have the engine freezing, that's probably a programming bug you need to fix in your code. But the overall streaming is just part of the design.
For the game actually stalling or freezing during a load, you need to fire up a profiler or debugger and detect what is going on when it happens. Almost certainly you're making a blocking call when non-blocking options are available.
The rest is by design. It is fundamental to how Unreal works.
The engine loads up metadata for you to use that serves as proxies to the actual data. You get an object that represents the mesh, you get an object that represents the texture. You don't get the raw data which is sent to the video card because your raw data might not be loaded, it might be instanced, it might be at a low level of detail, it might be on a billboard, it might not be loaded at all. If you dig into the system it is exposed in the depths, but it's quite rare to actually need that sort of thing.
The engine is designed to automatically load and unload things behind your back. It loads some things at startup, but it also loads things during runtime. That's a good thing, and most games love the feature. The alternative means you cannot have worlds that are as complex or diverse, it means you have to manually phase things in and out, or you need to design each world with only a small subset of resources.
There are steps you can take to encourage loading. You can mark assets that you want loaded. You can mark audio by priming it for playback and marking with Retain on Load, you can mark level objects by making them persistent, you can create an Array of objects that you keep around so it doesn't get garbage collected. Just be aware that none of those are strict guarantees. They might not have all the details fully loaded when you start up. When space gets tight the system will unload stuff for you. And if you force too much stuff into memory and you run out, you'll get crashes. For example, if you try to force all your graphics to load you'll fill your GRam buffers and get an Out of Memory crash.
That's just the nature of Unreal. Play any Unreal game and that's what players are used to experiencing. When they first load into the world or use fast travel assets are streaming in, some popping into existence and others getting progressively better detail as assets stream. Unity does something similar.