- Post your Feature Requests in this thread -

Vote for new features, or make your own requests here.
User avatar
Joel
Moodkie Staff
Posts: 3785
Joined: Wed Nov 07, 2012 10:32 pm

Re: - Post your Feature Requests in this thread -

Post by Joel »

Hi there,

Thanks for your feature request, there's already a Feature Request for this here.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

Gladyon
Posts: 30
Joined: Thu Sep 07, 2017 6:51 am

Re: - Post your Feature Requests in this thread -

Post by Gladyon »

I haven't found any reference on 'StringBuilder' in here.

I have tried to save a list of StringBuilder but the list is always containing empty elements.
I suppose that StringBuilder isn't supported.

Would it be possible to support StringBuilder?

User avatar
Joel
Moodkie Staff
Posts: 3785
Joined: Wed Nov 07, 2012 10:32 pm

Re: - Post your Feature Requests in this thread -

Post by Joel »

Gladyon wrote:I haven't found any reference on 'StringBuilder' in here.

I have tried to save a list of StringBuilder but the list is always containing empty elements.
I suppose that StringBuilder isn't supported.

Would it be possible to support StringBuilder?
Hi there,

StringBuilder does not provide us with any accessible fields to serialise. However, the easiest way to serialise a StringBuilder is simply to export it as a string and save that.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

Gladyon
Posts: 30
Joined: Thu Sep 07, 2017 6:51 am

Re: - Post your Feature Requests in this thread -

Post by Gladyon »

Joel wrote:
Gladyon wrote:I haven't found any reference on 'StringBuilder' in here.

I have tried to save a list of StringBuilder but the list is always containing empty elements.
I suppose that StringBuilder isn't supported.

Would it be possible to support StringBuilder?
Hi there,

StringBuilder does not provide us with any accessible fields to serialise. However, the easiest way to serialise a StringBuilder is simply to export it as a string and save that.

All the best,
Joel
Well, the whole goal of using StringBuilder in the first place is to avoid garbage, and exporting it to a string would do just that.
But I suppose that serializing a StringBuilder will also generate garbage anyway.
Sorry for that, I was just surprised when I saw it was missing, maybe adding it by exporting it to a String would be enough, at least so that nobody else is surprised when it's missing. It probably comes from TextMeshPro which can now use StringBuilder as input, so more people will use StringBuilder in the future.

That said, I'm sure that by looking at the 'StringBuilder.ToString()' code it is possible to find out how to serialize a StringBuilder (but it probably won't be easy).
https://referencesource.microsoft.com/# ... references
This is only the current version, if .NET 2 is used then the 'StringBuilder' class was implemented differently, with an underlying 'String' insead of several chunks of 'Char[]':
https://searchcode.com/codesearch/view/7227794/
These links may not be the exact versions used by Unity, but I forgot the URL for the Unity repos.

User avatar
Joel
Moodkie Staff
Posts: 3785
Joined: Wed Nov 07, 2012 10:32 pm

Re: - Post your Feature Requests in this thread -

Post by Joel »

Hi there,

I'll see about adding support for StringBuilder in the next update using the ToString() method.

It's not possible to seralise the StringBuilder through it's fields because the fields are inaccessible (more specifically, the fields are marked as internal so cannot be accessed outside their assembly).

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

Gladyon
Posts: 30
Joined: Thu Sep 07, 2017 6:51 am

Re: - Post your Feature Requests in this thread -

Post by Gladyon »

Joel wrote:Hi there,

I'll see about adding support for StringBuilder in the next update using the ToString() method.

It's not possible to seralise the StringBuilder through it's fields because the fields are inaccessible (more specifically, the fields are marked as internal so cannot be accessed outside their assembly).

All the best,
Joel
It is possible to access the fields using reflection, but it would break when/if Unity changes the .NET version and the 'StringBuilder.cs' code is modified.
That said, I do understand that it's not advised for an asset to access private code within the framework itself.

Thanks for considering adding StringBuilder support using 'ToString()', it will make ES3 even more complete.

Walrusware
Posts: 4
Joined: Fri Jan 03, 2020 10:51 am

Re: - Post your Feature Requests in this thread -

Post by Walrusware »

I would like to request that ES3 support saving doubles. Thank you

User avatar
Joel
Moodkie Staff
Posts: 3785
Joined: Wed Nov 07, 2012 10:32 pm

Re: - Post your Feature Requests in this thread -

Post by Joel »

Walrusware wrote:I would like to request that ES3 support saving doubles. Thank you
Hi there,

Easy Save already supports saving all primitive types, including doubles. I.e. ES3.Save<double> and ES3.Load<double>.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

Walrusware
Posts: 4
Joined: Fri Jan 03, 2020 10:51 am

Re: - Post your Feature Requests in this thread -

Post by Walrusware »

Ah sorry it wasn't in the list, clearly I just did something wrong. That's not a surprise. Thanks

nFighter
Posts: 49
Joined: Thu Apr 12, 2018 7:15 am

Re: - Post your Feature Requests in this thread -

Post by nFighter »

Hey! For now we can only download all the file names from the ES3 cloud. Is it possible to have a feature to get a list of the files with a certain mask? So it will be a fast milliseconds mysql query who did all the sorting/searching job (instead of manual unity sorting which could take minutes on a large database). It will be a great help to have this feature as well as playmaker action for it <3

Post Reply