I am making a level selector, which works like a web slider. I am showing 12 levels per page, and I have a total number of 60, which means 5 pages of 12 levels.
Each level has his on background image, and I tried to load all the backgrounds into an Texture2D array. Since now I loaded only 12 backgrounds, because I had only them, everything worked perfectly. Now, I have more, about 40, and when I try to load them into the array I receive this error:
Additional information: HRESULT: [0x8007000E], Module: [General], ApiCode: [E_OUTOFMEMORY/Out of memory], Message: Not enough storage is available to complete this operation.
for (int i = 1; i <= 36; i++) LevelBackgroundTextures[i] = Resource.ContentManager.Load<Texture2D>("Levels/Backgrounds/bg_" + i);
If I understood correctly I receive this error because I do not have enough space (RAM) to load all the content once and I need to use multiple content processors, and here is the problem.
I do not know how can I use them to be effective, when to load/unload the content, etc. Or is there another way that I can fix this error?