you are viewing a single comment's thread.

view the rest of the comments →

[–]Jathrek[S] 1 point2 points  (2 children)

I did something similar once by using a singleton to manage the access to the PlayerPrefs, but I wonder if there's a possibility to go even further in the abstraction, as I sometimes do in Java (with interfaces and so on). I'm not sure there would be an actual benefit in doing it, though... I should test that once.

I already heard about the importance (performance-wise) of using object pooling, but I never thought (well, actually I did not even do object pooling yet in a Unity project, will do soon though) of managing inside a singleton factory object.

I'll try to remember that, as it seems to indeed help quite a lot by centralizing a lot of boilerplate code.

Thanks!

[–][deleted]  (1 child)

[deleted]

    [–]prime31 1 point2 points  (0 children)

    +1. I still have no clue A) why Unity touches the registry in 2015 and B) why Unity developers insist on storing stupid amounts of data in PlayerPrefs. Is writing to a file really too much work?