Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EditorPrefs support #15

Open
rhys-vdw opened this issue Mar 20, 2023 · 6 comments
Open

EditorPrefs support #15

rhys-vdw opened this issue Mar 20, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@rhys-vdw
Copy link

rhys-vdw commented Mar 20, 2023

Hi, would you be interested in adding support for EditorPrefs? I feel it would be a small change given it's essentially the same API as PlayerPrefs.

(Open to submitting a PR if approved)

@Dysman
Copy link
Owner

Dysman commented Mar 20, 2023

Hi rhys-vdw,

thanks for you interest in this plugin. The funny thing is that this plugin had some EditorPrefs support planed in the beginning.
But this feature was not used from the beta testers so it get not full implemented. After some time all leftovers get removed.

Following toughs was the main reason why it was dropped:

  1. Not from interest for the most User
    If you work on a project you never need it. It would be more for other tool developers they extend the editor.
  2. They are the same across different projects (global)
    What is a bit against the editor opens a project concept. So it's easy possible to influence other projects.
  3. Huge number of EditorPrefs
    They can be fast a huge number of EditorPref entries. What can end in a massive and most unnecessary (see 2.) overhead.
    The reordable-list that the UI based on is not very good with a big number of entries. Had already done a couple of performance optimizations.
  4. Cryptic EditorPref naming
    The entries from the engine it self are not designed to get read from humans.
  5. Increase the maintenance effort
    It requires more maintenance to test and keep running. Specially for the MacOS support.

But this all is not a reason to not support the feature if there is a proper use of EditorPrefs. And it sounds like you have the need ;-)
I will take a investigate if there is a proper way to support it and keep all so clean and easy as possible.

@Dysman Dysman added the enhancement New feature or request label Mar 20, 2023
@Dysman Dysman self-assigned this Mar 20, 2023
@rhys-vdw
Copy link
Author

That all makes sense, but I'm not sure about this one:

If you work on a project you never need it. It would be more for other tool developers they extend the editor.

I would say this is would be a useful tool for anyone who is debugging an editor tool, whether they're using it internally to their project or planning to distribute it.

That said, looking at the code, I'm not sure I'd be well positioned to add this feature in a timely manner with all the different platforms (especially if it involves an optimization pass), so perhaps I ought to retract my offer.

It's a shame Unity doesn't offer a way to iterate the key/value pairs directly.

@dimmduh
Copy link

dimmduh commented May 18, 2023

I also thought the plugin supports EditorPrefs, but no (

@rhys-vdw
Copy link
Author

I also thought the plugin supports EditorPrefs, but no (

Haha, yeah. I think if you look at the source you'll understand why.

@Dysman
Copy link
Owner

Dysman commented May 18, 2023

Have investigated what would be necessary to add this feature.
It's a bit of work but possible. Will take a look if I find some time for a prototype soon.

@dimmduh
Copy link

dimmduh commented May 19, 2023

I'm using this now https://github.com/sabresaurus/PlayerPrefsEditor.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants