Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

There are actually quite a few issues with texture management I have to admit, so you are correct to question this.

While materials should already be disposed of properly in most circumstances, I was ignorant so far to the texture situation itself.

Improvements are planned for an upcoming update where materials automatically get rid of their textures. But this will unfortunately not address "Set mesh texture". 

Proper texture management in the future (before 1.0) will have the aim to dispose of any texture in memory that is not currently used by any object and also probably provide shared textures for non-instanced objects.

Speaking more generally I don't know if it's the best approach to load/dispose the texture every time for a supposed LOD change. What kind of objects/behaviors are you trying to apply a level of detail system to like this? And are you using large textures?

I don't know what textures are considered large, but I can send you the capx of the project if that makes it clearer what I mean. If you decide to view the project, I should mention that I have only applied this method to a container. https://uploadnow.io/f/GmrzbmD

In a scene like this or even a significantly bigger one it doesn't matter much if you switch to lower resolution texture manually.

Are you running into any issues like low performance or what's the reason for wanting to apply some kind of LOD system here?