So some games tend to load things into the memory before a level starts up, and some just load as you play… Hmmm
Which is better?
And how do you load your game data into the memory before a scene starts in Unity?
So some games tend to load things into the memory before a level starts up, and some just load as you play… Hmmm
Which is better?
And how do you load your game data into the memory before a scene starts in Unity?
you can’t
either you load the scene or you load it while the scene is already running from resources / asset bundle
Maybe my question wasn’t clear enough…
I have been working on a game that would have over 100 gameobjects running on screen, which cause lag from time to time, is there a way to preload them into memory to avoide the lag?
you can place them in the scene so they are loaded together with the scene or make prefabs that you put into the resources folder and load on entering the scene / specific areas through Resources.Load
I have been using Unity for a while now, but never came across this topic, sorry for my ignorance, but let me ask you this, if you load those prefabs from the resources folder upon say launching the scene, would that speed up thing if you say place 100 or more of the in that scene? And how, I don’t quite understand that? What is the difference between placing a prefab at running time from the hierarchy or placing them by using the resource.load ?
You could load the objects in a previous scene, and give them a DontDestroyOnLoad (this); command and deactivate them in the Awake function. Then activate them when the new scene starts.