Overflow! Each collection allocates memory by numbers from the game.project (SOVLED)

Hey! Our approach to solve this problem is to improve collection factories to handle dynamic resource loading better. With these changes you should be able to use collection factories to spawn your buildings with ability to control when the resources are loaded/unloaded. While I was experimenting with this, I found that the current implementation is buggy, as it is already loading resources dynamically. It however loads them synchronously so I would expect it to cause a few hitches while loading textures etc. Right now you can however exploit this bug to get rid of the memory issue, i.e. spawn your buildings through collection factories.

Current faulty behaviour:
Collection factory loads resources synchronously when collectionfactory.create is called

Correct behaviour:
Collection factory either (controlled by user):
loads resources when its containing collection (i.e. the game or the level) is being loaded
loads resources asynchronously when collectionfactory.create is called, or a new function collectionfactory.load is called

We will also add the same thing to the factory component, which is used when spawning single game objects.

10 Likes