Giter Site home page Giter Site logo

dysman / bgtools-playerprefseditor Goto Github PK

View Code? Open in Web Editor NEW
149.0 2.0 23.0 543 KB

Tool extension for the Unity Editor that enables easy access to the player preferences over a simple UI.

Home Page: https://bgtools.de/post/playerprefseditor/

License: GNU General Public License v3.0

C# 100.00%
unity unity-editor unity-tool bgtools player-preferences-editor playerprefs upm

bgtools-playerprefseditor's Introduction

PlayerPrefs Editor for Unity 3D

Minimal unity editor version CI   Release GitHub package.json version (branch) openupm AssetStore

Flattr this git repo  Buy me a coffee

Tool extension for the Unity Editor that enables easy access to the player preferences over a simple UI. Allows to view, add, remove and modify entries on the development machine.

Preference editor window

Features

  • Add, remove and edit PlayerPrefs
  • Intuitive visual editor
  • Works with standard Unity PlayerPrefs
  • Monitors changes from code
  • Supports all editors (Windows, Linux, MacOS)
  • Lightweight dockable for full integration in your workflow
  • Supports both skins (Personal, Professional)

Requirements

Unity Version: 2019.4 (LTS) or higher

Editor Version: Windows, MacOS, Linux

Installation

The plugin provides manual and UPM installation.

Additionally it's available on the Unity Asset Store.

Manual

Place the PlayerPrefsEditor folder somewhere in your project. It's not relevant where it's located, the plugin will find all of its files by itself.

Unity Package Manager (UPM)

Via Git URL

Through the Unity Plugin Manager it's possible to install the plugin direct from this git repository. The UPM need a specific structure what will be provided into the upm branch.

Use following direct URL for the configuration:

https://github.com/Dysman/bgTools-playerPrefsEditor.git#upm

See official Unity documentation for more informations: UI or manifest.json

Via OpenUPM

The package is available on the openupm registry. It's recommended to install it via openupm-cli.

openupm add com.bgtools.playerprefseditor

Usage

The entry to open the PlayerPrefs Editor is located in the top menu at Tools/BG Tools/PlayerPrefs Editor. It's a standard dockable window, so place it wherever it helps to be productive. A more detailed manual can be fund in following locations:

  • GitHub (Manual)- Manual page
  • GitHub (UPM) - Press the Documentation link on the UPM description.
  • Unity Asset Store Package - MANUAL.html

bgtools-playerprefseditor's People

Contributors

dysman avatar favoyang avatar metaphore avatar mycodingdad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bgtools-playerprefseditor's Issues

Issue when project has "/" in name, on Mac editor

Hello all,

Encountered an edge case on my Mac editor:
When the project has a "/" in the name, something like "Next A/R", the var pathToPrefs in PreferencesEditorWindow.cs becomes "Library/Preferences/unity.<comp.name>.Next A/R.plist" but the actual file on disk is located at "Library/Preferences/unity.<comp.name>.Next A_R.plist". Unity avoids the character by replacing it with "_".

I got around this issue locally by modifying line 73 of PreferencesEditorWindow.cs to read
pathToPrefs = @"Library/Preferences/unity." + PlayerSettings.companyName + "." + PlayerSettings.productName.Replace('/', '_') + ".plist";

I did not check the naming convention on other platforms, but this seems to fix it for Mac OS.

EditorPrefs support

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)

[Mac] Wrong character replacement in the path

OS: macOS Monterey Version 12.5 (M1)

The name of our project is: Spirits: Seeds of Dreams. The Storyteller.
EDIT:
The name of the project is The Storyteller..
The company name is: Spirits: Seeds of Dreams..

The generated path replaces the : as a _:
image
But in the actual path the : is replaced as /:
image

This is certainly related to #4 .

Editor not showing under ' window' tab

I just downloaded this package and imported it but it doesnt seem to work for me. It should be present under the window tab if I understand it right but I don't see it.

Resizable column layout

What causes me trouble is that I have quite long variable names and for a group of them I use the same beginning, like on this picture. There is not enough space for the ending of the variable names to display, even if I make the window wider. Could you please make the first column resizable?

image

License not compatible with Unity asset store

Hey I just checked your license file and it is not compliant with the submission rules of the unity asset store, and is effectively annoying for commercial games (and even other free games that might want to use MIT licensing wich was my case)

Here are the rules for reference, the interesing part in our case is the licensing part obviously
https://unity3d.com/fr/asset-store/sell-assets/submission-guidelines

On a little side note, I guess Unity didn't notice since the license file seems to not be included in the unity package, but your license clashes with the default license of the unity asset store so redistributing it like that actually breaks your license too :/ (and also distributing the software without the license file also breaks your license)

I suggest switching out for an MIT licensing or seeking out for an other free license compatible with unity's policy

Incorrect cleaning of the name of the keys on Windows

Hi, thanks for your asset, it helps out very often. Yesterday I found a bug that not all keys are shown in the editor. After studying the sources, I found the problem and was able to fix it.

It appears on Windows in this place:
BgTools.PlayerPrefsEditor.WindowsPrefStorage.FetchKeysFromSystem

image

He successfully receives the keys. But then he cleans the names.
cachedData = cachedData.Select((key) => { return key.Substring(0, key.IndexOf("_h")); }).ToArray();

And as you may have noticed in the screenshot, part of the key also falls under this cleaning. From which, in the subsequent code, an incorrect key is processed, which as a result is not displayed in the editor.

Locally I corrected like this:
cachedData = cachedData.Select((key) => { return key.Substring(0, key.LastIndexOf("_h")); }).ToArray();

image

And it works!

Version mismatched

Issue

  • GitHub Release v1.0.1
  • package.json 1.0.0

Fix: bump package.json to 1.0.1 then retag v1.0.1

And, you may want to check out this post for managing the release process with CLI.

Wrong characters in detected registry path prevent pref reading

Issue that get Reported on discord.

Original:
`Hello @Dysman, I am using PlayerPrefs Editor on Unity for some months now, this really helps me a lot, I am so thankful for that. Recently I start using it in a 3 year old project with a fancy name, which is "Qual é a Palavra?". This is the Product Name. I see that on Unity it has the path like:

\SOFTWARE\Unity\UnityEditor\Khrysller\Qual é a Palavra?

But on Windows it shows this way:

C:\Users\XXX\AppData\LocalLow\YYY\Qual é a Palavra_

I think because of this I am not able to active the Watch Changes button. I just want to share this specific case and also I tested changing the name to QualEhAPalavra and everything works flawless. `

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.