Using resources generated during gameplay in Player

Hi,

I’m trying to… hmm, actually I have made simply save/load system, when during writing xml file screen is captured and saved in “app.dataPath”+Resources folder, than in save/load menu I’ve added thumbnails of our saves. In editor it works fine, but after building and running as stand alone - it doesn’t work at all.

Does anyone knows fast and build-in method of loading resources not included in *.assets files during game building process? Or - is there a way to get into assets from player (for eg to save screenshots in resources.assets)?

I do not enclose any code cause as I have said - all works fine in editor, so there is no “code problem” and I do not use any editor classes in this script. I just can’t find a way to load assets at path or add new resources after building the game.

Any advices and help welcome!

Kind regards,
Mad

www and loading them, will work for textures and sound.

meshes require that you write own reader and writter

I have tried this a while ago - but after “Too many threads” error I left this idea away. I will play with this and share results - thank You.

Ah that part is easy to solve normally: Write a WWW management class that ensures that you don’t have more than one WWW to file:// at a time

alternatively you can use File.IO but then you will need more work.
textures are the only thing you can load from byte[ ] as you get them from file IO I think

externalData0 = new WWW ("file://"+Application.dataPath+"/externalData/smini0.png");
    yield externalData0;
    gameDataBlocks[0].blockPicture.texture = externalData0.texture;

Ok, what is wrong with method above? Doesn’t work in both - editor and player (folder externalData and files are on the place - thumbnails are even updated after game save). No errors and exceptions in debug mode. Is there anything else I should do to correctly use www?

Kind regards,
Mad

SOLVED - God, it has to be in per-frame function -_-’ Now it works (quite slow, but works :)) - thanks dreamora.