Currently, it appears that if you want to asyncronously load another part of the world, LoadLevelAdditiveAsync will invoke a FindObjectsOfType internally.
For small scenes this isn’t an issue. But in cases where a feature like this would probably have its most value (i.e. open world games), you probably have a lot of objects existing in the scene at once - and in these cases, invoking FindObjectsOfType is B-A-D.
Yet… LoadLevelAdditiveAsync does just that.
So lets recap:
- Open world games need to use LoadLevelAddtiveAsync to load in more of the game world without creating frame rate hitches.
- Open world games have a lot of objects loaded at once.
- Calling FindObjectsOfType in a scene with a lot of objects loaded at once creates frame rate hitches.
- LoadLevelAddtiveAsync calls FindObjectsOfType.
Therefore:
- Calling LoadLevelAddtiveAsync in a scene with a lot of objects loaded at once creates frame rate hitches.
- Calling LoadLevelAddtiveAsync in an open world style game creates frame rate hitches.
- Open world games have no means to load in more of the game world without creating frame rate hitches.
Seems like a nasty catch 22. Is the work around to simply not use Unity’s level loading features at all? Do we need to load in everything manually, e.g. asset bundle async loading?