Level streaming.

I’m currently planning to make a level streaming for my game, so I need some help and advice on it.

(project with .net 4.6)
Theory:
I plan to stream prefabs from disk.
The loading and unloading things will be in “Firewatch style” unsing triggers in the word.
In the world will be “dummy” gameobjects with data with prefab where and it rotation and etc.
The streaming process, I plan to do like:
Load prefabs from Resources, in a separate threads. And Instantiate them in Update loop.
The Gameobjects I plan to sore in concurrent collection.

And I need help at this questions:
When Gameobject unloads from memory? (So I can’t store a link to prefab in dummy object)
Can be destroyimmidiate be usefull in this case?
Will GC kill me for such a mess?:slight_smile:

DestroyImmediate is for editor use only as far as I know. Unity will moan at you for trying to use it otherwise.

Unfortunately I have nothing to contribute to this question apart from:
The developers of Inside used an implementation of level streaming to achieve higher FPS and a smoother playback so I assume if they generated tons of garbage it wouldnt result in the smooth gameplay they wanted.

https://www.youtube.com/watch?v=mQ2KTRn4BMI

ah, if I was smart enough to understand what is updatemanager, and how it look like…

Well, on not using instantiate, my idead was in instantiating and destroying objects, that will do the mess. Ok thanks, i defenetly should study much more about how to be perfomant with large world in unity. :smile: