Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Phuzz on May 02, 2017, 05:24:21 AM

Title: Saving Hashtables generated at Runtime [Solved]
Post by: Phuzz 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.
Title: Re: Saving Hashtables generated at Runtime
Post by: jeanfabre 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
Title: Re: Saving Hashtables generated at Runtime
Post by: Phuzz 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?
Title: Re: Saving Hashtables generated at Runtime
Post by: Phuzz 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
Title: Re: Saving Hashtables generated at Runtime
Post by: jeanfabre 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
Title: Re: Saving Hashtables generated at Runtime
Post by: Phuzz on May 23, 2017, 08:57:24 AM
Bump.. and thank you :)
Title: Re: Saving Hashtables generated at Runtime
Post by: Phuzz 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.
Title: Re: Saving Hashtables generated at Runtime
Post by: jeanfabre 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
Title: Re: Saving Hashtables generated at Runtime
Post by: Phuzz 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.
Title: Re: Saving Hashtables generated at Runtime
Post by: jeanfabre 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
Title: Re: Saving Hashtables generated at Runtime
Post by: Phuzz on May 31, 2017, 03:44:11 AM
Thank you very much :)
Title: Re: Saving Hashtables generated at Runtime
Post by: Phuzz on June 07, 2017, 07:30:27 AM
Hello,  :)

I hope there is a solution for the issue, thank you
Title: Re: Saving Hashtables generated at Runtime
Post by: jeanfabre 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
Title: Re: Saving Hashtables generated at Runtime
Post by: jeanfabre 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.

(http://i.imgur.com/k1Cdljv.gif)

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

Bye,

 Jean
Title: Re: Saving Hashtables generated at Runtime
Post by: djaydino 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)
Title: Re: Saving Hashtables generated at Runtime
Post by: Phuzz on November 05, 2017, 09:18:20 AM
Hello,

I found a very hard workaround "at the time of the post" for this, but this solution is 1000 times better, i cant believe it took me a while to return to this post :) thank you