playMaker

Author Topic: Saving Hashtables generated at Runtime [Solved]  (Read 5289 times)

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Saving Hashtables generated at Runtime [Solved]
« on: May 02, 2017, 05:24:21 AM »
Hello,

Is there a way to access a Hastable in Editor mode that is generated at runtime? basically I would like to save the generated Hastable into a Hastable game component to be accessible in Editor mode. I am using Easy Save 2 to to save and load my data, but since its just a first time launch Hashtable I would like to increase performance by having the contents of the hashtable included in the final build instead of generated at runtime on mobile device.
« Last Edit: November 05, 2017, 09:18:58 AM by Phuzz »
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Saving Hashtables generated at Runtime
« Reply #1 on: May 02, 2017, 05:29:10 AM »
Hi,

 try copying the component, stop the plackback and paste it, normally this should do the job.

 Bye,

 Jean

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Re: Saving Hashtables generated at Runtime
« Reply #2 on: May 02, 2017, 03:54:21 PM »
This worked with other components like rect transform, but it is only pasting the Hashtable name and type with empty contents, it is responding as Paste component as new even though I am choosing past component values, maybe it's a bug?
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Re: Saving Hashtables generated at Runtime
« Reply #3 on: May 04, 2017, 09:50:20 AM »
Still no solution for this from my side, any help would be useful for many :) thank you
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Saving Hashtables generated at Runtime
« Reply #4 on: May 15, 2017, 04:54:43 AM »
Hi,

 ok yes, I'll work on this. Please bump me early new week if I have not provided before.

 Bye,

 Jean

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Re: Saving Hashtables generated at Runtime
« Reply #5 on: May 23, 2017, 08:57:24 AM »
Bump.. and thank you :)
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Re: Saving Hashtables generated at Runtime
« Reply #6 on: May 28, 2017, 09:06:34 AM »
Hello,

Still no solution for this from my side, any work around?

I tried copying the contents of the generated hashtable to another gameobject  empty hashtable using Hashtable Concat, then copying that content to paste off run-time and still did not work.
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Saving Hashtables generated at Runtime
« Reply #7 on: May 30, 2017, 04:12:57 AM »
Hi,

 yes, I am trying to find a way but it's compromised unfortunatly, the problem is that the prefill system is constraining the type, and at runtim any value can be added in the hashtable so it's two distinct way to store data. I have not found yet the right way to approach this copy pasting...

what I could do is check what type was used during editing and check the runtime values and default to null for all values not matching the prefill type, would that work for your case?

Bye,

 Jean

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Re: Saving Hashtables generated at Runtime
« Reply #8 on: May 30, 2017, 07:26:38 PM »
Hello,

The contents of the Hashtable are only strings, so basically one type only through the whole process of generating the hashtable. I might consider including the ES2 save file containing the generated data with the final build if this does not work, reading ES2 docs now to figure out how that is done.
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Saving Hashtables generated at Runtime
« Reply #9 on: May 31, 2017, 02:04:27 AM »
Hi,

 ok, so if type doesn't change from editor time to runtime I can do something about this. I should be done by the end of this week on providing this feature.

 Bye,

 Jean

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Re: Saving Hashtables generated at Runtime
« Reply #10 on: May 31, 2017, 03:44:11 AM »
Thank you very much :)
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Re: Saving Hashtables generated at Runtime
« Reply #11 on: June 07, 2017, 07:30:27 AM »
Hello,  :)

I hope there is a solution for the issue, thank you
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Saving Hashtables generated at Runtime
« Reply #12 on: June 13, 2017, 05:59:06 AM »
Hi,

 yes there is, I just need to allocate the time for this... trying to wrap up videoPlayer support and a uGui update, and update the PlayMakerEcosystem for Unity 2017, once that's done, then I can tackle this. thanks for your patience :)

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Saving Hashtables generated at Runtime
« Reply #13 on: June 22, 2017, 03:52:30 AM »
Hi,

[UPDATE] redownload if you just did as know you only need one step to copy, not two: https://twitter.com/PsyKola/status/877818574341013505

 ok, update on the Ecosystem, please update ArrayMaker, it has a new feature that allows you to copy data from arrayList and HashTables from runtime back to edit time.



Let me know if you hit any issues with various variable types, normally it should play nice whatever the content.

Bye,

 Jean
« Last Edit: June 22, 2017, 06:21:51 AM by jeanfabre »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Saving Hashtables generated at Runtime
« Reply #14 on: June 22, 2017, 04:31:43 AM »
Sweet!
Thats very usefull!!

I will use this very soon to test combinations on my Slots game! and place them in the right arrays. (i still have to send you a video from it, but it was on hold due to other projects and work)