When I try to reuse a preloaded AssetsManager texture in a PhotoDome by passing the loaded texture.url in the PhotoDome constructor, the inspector indicates that a new texture (with slightly different parameters) is created, rather than reusing the existing texture.
Is this something I need to be concerned about and if so, is there a way to reuse my loaded texture?
Thanks @RaananW yes that’s sort of what I’m doing. On textureTask success I add the task to a global asset tasks array pool for later reuse. I’m saving the task rather than the texture directly as I’m trying to keep my asset loader generic and working for all task types. I was just concerned when I noticed the texture duplicated in the inspector but if it’s not reloaded then it should be fine.
Well, it shouldn’t appear as a new texture if you are reusing the texture object. Only if you use the URL again. Want to share a playground for us to better understand the situation?
The PhotoDome takes texture url in its constructor, not the texture itself, so I have no option there.
I’ll try to get a PG done, but it’s probably enough to know that duplicate textures in the inspector doesn’t necessary mean twice the memory usage or performance hit.