Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Advanced PlayerPrefs Window [Released]

Discussion in 'Assets and Asset Store' started by Lukas H, Mar 12, 2013.

  1. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    $advanced-playerprefs-window-icon.png

    Are you getting tired needing to Debug.Log to find out the value of some PlayerPrefs key?
    I did, thats why I created the Advanced PlayerPrefs Window.

    It displays all your PlayerPrefs in a window and allows you to create, change, delete and refresh every entry.
    I've used it extensively during the development of my latest game, mostly when doing level (un)locking and highscores.
    The layout of the window has been tweaked time and time again over weeks, fine tuning it so it fast and easy to use without fuss.

    $advanced-playerprefs-window.png

    Still not clear? Watch the YouTube introduction.
    You can find the Advanced PlayerPrefs Window in the AssetStore here

    As always, I am always interested in comments, suggestions and feature requests!
     
    Last edited: Mar 13, 2013
  2. SimtropBuggi

    SimtropBuggi

    Joined:
    Feb 15, 2013
    Posts:
    98
    While videos are good, a screenshot in your announcement post would give people an at-a-glance idea of what you are offering.
     
  3. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    I've updated the start post! Instead of cramping the screenshot and logo together I've separated them.
    Hopefully this makes it clear what its all about! :)
     
  4. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    Awesome tool! Bought it and am very happy with it: superpolished and functional
     
  5. Univerb-Gaming

    Univerb-Gaming

    Joined:
    Jun 28, 2012
    Posts:
    255
    *** no longer relevant *** :)
     
    Last edited: Mar 15, 2013
  6. Univerb-Gaming

    Univerb-Gaming

    Joined:
    Jun 28, 2012
    Posts:
    255
    To the original poster, the idea is basic but useful to many needing quick access to editing playerprefs. Hope to see more from the tool in future
     
  7. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    Thanks for the kind words, I appreciate it!
     
  8. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    So I've been tweaking the interface once more. In the next update there's going to be a toolbar.
    In this toolbar are a few features: sort by (key) name, options: add new entry, delete selected entries and delete all entries, toggle auto refresh and the refresh button.

    So no features lost and one new feature added: sort keys by name. Which can be found in the upper left corner of the toolbar.
    The toolbar allows me to add more features while keeping the interface clean. Currently I haven't set a release date yet but if you subscribe to this topic you will be notified when its done.

    As screenshots speak louder then words, here's a preview of the next update.
    $Compare.png

    Any comments/requests/hate mail? :)
     
  9. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    Compact is always better: love it :)
     
  10. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    New version has been submitted. It sports the toolbar and a brand new feature: sort by key (ascending descending)

    It will look like this:
    $Overview.png

    I'll let you know when its approved!
     
  11. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
  12. burtonposey

    burtonposey

    Joined:
    Sep 8, 2009
    Posts:
    62
    You did a great job with this asset! I bought another one before this for $5 and it wasn't that great. I couldn't get it to continually update or update at all while I was running so it was practically useless to me. Yours is very fast, and when it needs a moment it even lets you know so via a spinning indicator. It always gives me the keys I'm looking for.

    I'll be sure to leave a 5 star review when I get a chance this week. Thanks for offering this and best of luck to you!
     
  13. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    Thank you so much for your kind words!
    I've been working for 11.5hours straight but this totally makes my day :)

    Some where in the future I want to add a searchfilter, like the you can do with project files. I can't promise any date as I am in crunch mode right now.

    Also a thank you in advance for the 5 star review, those really help!
     
  14. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    hello lukas
    i was wondering if you can secure your playerprefs , like encrzpted the data so it won t be easy for whoever want to access it, i have in mind some inapp purchase, there only one solution in the asset store at the moment, maybe it s something could look into as complement to your asset
     
  15. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    That is actually something I am interested in but the main problem is you don't want to drag in the Cryptography namespace at is you won't be able to use stripping in the buildsettings (which will make you game build bigger)
    I have a MD5 solution but it generates a lot of garbadge which is also bad for performance.

    Perhaps I will implement my own SHA256 solution but I can't give a release date on that as I am very busy at the moment.
     
  16. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    I've just updated the Advanced PlayerPrefs Window with a new feature: a search filter
    Just enter (a part of) your search query and it will show only those entries matching your search. Just like the search in the project window :)

    $BOpzFQsCQAAeEDC.png

    I you have any questions, let me know.

    Enjoy!
     
  17. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Dear Lukas,

    I thanks for good quality and price asset :)

    I have just a question ...

    On my windows machine I create my key (I think is saved in registry key ....).

    Now I need to build my project for iOS so I update my project using SVN on my mac OSX machine.

    So Player Prefs is not shared on my OSX machine.

    How can I find a fix/workaround to share my playeprefs on multiple machine?

    Thanks
     
  18. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    If I put this in a project which already uses lots of player pref keys, will it automatically detect those or do I have to add them all manually?
     
  19. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    Hi,

    Unfortunately this isn't how Unity's PlayerPrefs work. PlayerPrefs are stored locally on the curent device and OS. This isn't something I can change because Advanced PlayerPrefs Window is build on top of Unity's PlayerPrefs class.

    If you want to have something you can commit you need to too find an other solution then the PlayerPrefs.
    Perhaps saving to a xml or json file? Those can be committed and are multiplatform.
     
  20. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    Hi,

    This wil work with already excisting PlayerPref keys.

    To give you an example, I build this tool because after six months in a project there were too much PlayerPref keys (100+) to debug by code.
    So I build this window and made my life a lot easier :)
     
  21. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Thanks for response :)

    So unique solution is to recreate for each machine same key prefabs using your tool or simple SetInt / String / SetFloat function, right?
     
  22. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    Yes thats correct.

    What I would do is to put all default keys and values in a "Reset" (editor)script.
     
  23. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    This will be a fantastic idea to share keys on multiple machine. Use a "text" file to store keys and load them when necessary :)
     
  24. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    242
    I was just looking into this tool and it looks really useful, but I agree with @kaz2057 that the playerprefs that I input with the tool should be saved into a project file. I'm unclear on how you're presently storing the data within the project which has me worried about whether the data is safely stored or might be accidentally deleted by a script glitch or user error at some point.

    But it sounds like if I just create all of my playerprefs in a script rather than using your tool to add them, then they will still show up in the tool and I can use the refresh features while the game is running. Sound about right?
     
  25. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    Hi Tim,

    Thats right.
    Creating your playersprefs using code will make them visible in the PlayerPrefs Window. Infact, the window uses the exact same methods as you are already using, i.e. SetInt, SetFloat and SetString. PlayerPrefs are stored in the registry on windows and in some plist file on the mac and ios.

    About your tweet, using PlayerPrefs to lock/unlock items, thats perfectly fine. One big but is that if you are locking them for the purpose of unlocking with IAP then you should be using something like encrypted playerprefs for security.
    Hows Phantom PI going?
     
  26. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    242
    Thanks for the fast reply. I'm only planning to use playerprefs for unlocking things like levels and basic in-game items and I'll also be pushing that info to iCloud, nothing to do with IAP. Things are going great on the Phantom PI, thanks for asking! :)
     
  27. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
  28. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    It seems like there is enough interest to create this feature so I'll put it on the road! :)
    I should have some time on my hands in December, November is just too busy project wise.
     
  29. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    I would certainly buy this if you have plans to make it compatible with: https://www.assetstore.unity3d.com/#/content/10395
    Anti-Cheat Toolkit

    yeah?

    edit; you know what for 4 dollars on sale today, I just bought it anyways. Good lock with your work keep it up, hopefully you do plan to integrate ACT it would be serious those 2 will go hand in hand together.
     
    Last edited: May 3, 2014
  30. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    Thanks for your purchase!

    At this point I have no plans on adding support for ACT. Although ACT is the most popular one there are other options out there and once I support one, others cannot be left behind.

    I did look into it about a year ago and had a talk with one of the publishers but it would require adding UI for like a hash/password and such which would destroy the easy/simple/clean look I try too maintain.

    A more elegant solution would be if ACT had the option to not secure/hash the PlayerPrefs key/values when working in the editor.
    After all ,why would you want to secure the editor version one could only play when one has the complete unity project source? :)
     
  31. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    Good to see the discussion. I've purchased both plugins- ACT and this. I am also requesting the same if your editor can show Obscured PlayerPrefs as well. I totally agree with you reasoning here, but it will add a lot of value to your editor. Either way, thanks for the great editor.
     
  32. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    we are all looking forward to it :)
     
  33. Hoskins355

    Hoskins355

    Joined:
    Jan 3, 2013
    Posts:
    142
    Can you help me I am trying to display player prefs OnGUI but my int always shows 0 on screen. But the Debug Log show the correct value. Why is this?

    Code (CSharp):
    1. void Start () {
    2. int Player1Score = PlayerPrefs.GetInt("Player1Score");                        // Player 1 Score
    3.         Debug.Log (Player1Score);
    4. }
    5.  
    6. void OnGUI () {
    7. GUI.Label (new Rect (55, 180, 150, 164), Player1Score.ToString(), "PlayerScore");
    8. }
    Thanks
    Brandon
     
  34. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    Did you hit the save button after changing the value?
    Is the key you are using in code exactly the same as the one you see in the editor window?
     
  35. Hoskins355

    Hoskins355

    Joined:
    Jan 3, 2013
    Posts:
    142
    Thanks for the reply. I fixed it by setting var right before the gui label in the OnGUI function. I don't know why It work the other way

    Code (CSharp):
    1. void OnGUI () {
    2. int Player1Score = PlayerPrefs.GetInt("Player1Score");
    3. GUI.Label (new Rect (55, 180, 150, 164), Player1Score.ToString(), "PlayerScore");
    4. }
    Brandon
     
  36. tolgamyth

    tolgamyth

    Joined:
    Jan 14, 2014
    Posts:
    4
    hi is there any encrypt choice for this plugin? Because for me it is not very useful without encrtypting hiscore or other values. However there were good examples of encrypting and decrypting values flawlessly. You can still show decryped or encypted value on the inspector by configurable. And also you can give a chance to user changing secret strings and keys. Hope encyrpt feature will be enabled soon.
     
  37. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    Hi

    There is no encryption support in this plugin. As stated earlier, this will nog be supported as there are other great options for that. Support could be buildin but for what plugin..? I think the encryption plugins should allow for the user to have an option to disable encryption when in the editor so you can use this plugin. What good does encryption in the editor do anyway?
     
  38. Keitaro3660

    Keitaro3660

    Joined:
    May 20, 2014
    Posts:
    86
    hey there, i sent you an email and you haven't answered :
    this is my email :

    _______________________________

    i just know your playerpref asset. i just know about playerpref 2 days ago, and i think i need something like your asset, that can see all the playerpref value.

    is your asset read playerpref value that already available too that created by playmaker or another asset?
    and how about playmaker suport? i use playmaker for the playerpref usage, not using script. but i get lost at tracking all my playerpref.

    so is this okay? any tips or suggestion before i choose to buy your asset?

    thanks
     
  39. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    Advanced PlayerPrefs Window is an editor extension and has no functionality for runtime.
    Its just an editor window build to make your life easier.

    I see no issues reading the playerprefs created by Playmaker, its all Unity after all :)
     
  40. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    225
    This is lifesaver :D especially for n00b like me who is learning unity through trial and error and now learning saving and loading stuff through playerprefs (lot of debug.log stuff to ensure what is happening :p) and all the info is so easily available now :)
     
  41. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Maybe one day you will make it compatible with ObscuredPrefs (anti cheat toolkit's prefs)

    That would be awesome!
     
  42. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    I've just submitted v1.8.1 which fixes the following bugs:
    Fixed: Not being able to copy paste from key textfield because of GUILayout.TextField instead of EditorGUILayout.TextField
    Fixed: New entries now show up directly in the window
    Fixed: Loader is now showing on OSX when refresh is pressed

    If anyone is stuck and can't wait for the review queue just drop me an email with your invoice# and I will be happy to send you the updated package directly.
     
  43. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    Is there any update on ObscuredPrefs (anti cheat toolkit's prefs) ?
    Thanks
     
  44. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    420
    Hi, I just got the plugin and am getting the following errors in Unity 4.6.7

    maxVertices < 65536 && maxIndices < 65536*3


    count <= std::numeric_limits<UInt16>::max()
    UnityEditor.EditorGUILayout:TextField(String, String, GUIStyle, GUILayoutOption[])
    APPWindow:OnGUI() (at Assets/AdvancedPlayerPrefsWindow/Editor/APPWindow.cs:309)
    UnityEditor.DockArea:OnGUI()
     
  45. LukasH

    LukasH

    Joined:
    May 16, 2014
    Posts:
    16
    Hi

    It this error popping up in an empty project?

    I have seen it before when I have a HUGE string stored and when Unity tries to render that string the textmesh needed more then 64k verts.
    Do you have any huge strings (like json) stored in PlayerPrefs?

    Sorry for the late response, I am currently on vacation and don't have a permanent internetconnection.
    I will monitor this topic though.
     
  46. Jean-Fabre

    Jean-Fabre

    Joined:
    Sep 6, 2007
    Posts:
    429
    Hi,

    I would ready enjoy the same system but for Editor player prefs :) when building editor tools.

    Bye,

    Jean
     
  47. holyfingers

    holyfingers

    Joined:
    Feb 2, 2012
    Posts:
    4
    Hi there,

    I can't seem to create any new entries using the editor window in Unity 5.5? They appear ok at first but disappear as soon as I refresh or hit the play button? Any ideas?

    Cheers,

    Nick
     
  48. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    66
    Howdee,

    Same for me as above (holyfingers), just came back to a project I'd been working on in Unity 5.3 and moved it to 5.5 today. My Advanced player prefs window seems to work until I press the play button then it all gets wiped. In fact i know I have player prefs saved but it can't see them either...

    Cheers!
     
  49. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    66
    So... just checked with another playerprefs editor and it does the same thing. So not anything specific to AdvancedPlayerprefs. Maybe something I've done or has changed since I used unity last.
     
  50. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    66
    Ok so, after a bit of research I found that the player prefs are stored in a different registry location to older versions of Unity.... Which is useful. I hacked the code in APPwindow.cs so it points at the correct registry and it works now. This is on windows 7 unity 5.5.0f3
    Edit line 623 to this:
    RegistryKey unityKey = cuKey.CreateSubKey("Software\\Unity\\UnityEditor\\" + PlayerSettings.companyName + "\\" + PlayerSettings.productName);

    I added the Unity\\UnityEditor\\ to get it to work. (I am not a coder fyi)
     
    clinton-reddie likes this.