0 votes

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:
https://github.com/godotengine/godot/issues/13954
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? :)

in Engine by (12 points)

1 Answer

+1 vote

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.

by (1,445 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.