Turn off 3D models (or material shaders) lazy loading when playing a 3D game level

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Anton P. Kolosov

Hello, I was wondering, it it possible to somehow load all 3D models at once when loading the level? Now I’m facing the following problem: suppose the floor of the building with different 3D models around it (chairs, tables, etc). When I start our game and begin walking the level, there is constant FPS drops when I stumble upon some 3D model I have not seen before at this playthrough. When I already saw all these models, everything is OK. I think this is probably some kind of lazy loading, can I turn it off somehow?

P.S.: I asked this question on Godot discord, and the guys gave me the following issue link:

so this problem really exists.
Another advice was to preload my materials in a singleton on the start of the game.
But maybe someone has another interesting solution for this problem? :slight_smile:

:bust_in_silhouette: Reply From: MysteryGM

The singleton option is the best if your game is relatively small and doesn’t need too much RAM.

The other way would be to load models per scene, using Load() in a script and constructing the scene. But that would be for large games where you are already using chunks or zones.