playMaker

Author Topic: Best way to save and load instantiated objects?  (Read 1781 times)

DeepShader

  • Playmaker Newbie
  • *
  • Posts: 33
Best way to save and load instantiated objects?
« on: May 14, 2015, 04:20:08 PM »
Hi there,
I've to instantiate objects at runtime (via PlayMaker Create Object action). In this case an empty image, which will be filled by the user with the build-in camera (mobile-phone).

That's working fine.

So my question is: What is the best way to save and re-load this images later?

My first idea is to store them in a directory as single png-files. But I don't know how to load them later without using a file-name-database. Is it possible to get all files in a specific directory?

I can't use file names like 00001.png, 00002.png, ... - because the user can delete this pictures, too - and if I would try to load them by number (00001.png, ...) I would get errors, if the user deleted an image before in the App.

I'm very new to this stuff. Is there a much easier way to do this? I also bought EasySave on the AssetStore - if this helps.

Thanks a lot for helping!!

DeepShader

  • Playmaker Newbie
  • *
  • Posts: 33
Re: Best way to save and load instantiated objects?
« Reply #1 on: May 17, 2015, 01:40:52 AM »
No one can help?  :-\

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Best way to save and load instantiated objects?
« Reply #2 on: May 17, 2015, 06:09:45 AM »
Using arraymaker hash tables might help- you can use the hash key to "name" them to access the files later on-

If you can store the images as a texture variable in a hash table it might work that way-

Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!