@foxter888:
I just read the manual page for PlayerPrefs and this sounds interesting, but how do I use it?
And what exactly can I store in it? Is it limited to only storing some preset values or how does it work?
As for what I’m doing, its a standard commercial grade single player game. You can read more about it here:
http://forum.unity3d.com/threads/128774-Creating-a-rather-complex-game-architecture-where-to-begin-and-how
@Tobias J.:
Very useful, especially for managing the menu system I’ve come up with.
I’m very curious, with this system you have, does it remember settings or previous game progress when turning on/off the application?
I want to have a check on startup, that a user can toggle to show or disable the intro at the beginning, but I’m not sure how to do that.
@Tseng:
Yes, the singleton pattern is something I’ve been reading about lately and most articles that talk about a game manager have something to do with a singleton pattern. This one I have a lot to ask about.
This is where I get most confused about this: If I don’t need to attach the gameManager to a script, then how do I know its running?
How does it exist and run within the program without being in a scene? What do I do to make it load when I hit play?
Also why is this gameManager not static? How will it work if it needs to present everywhere and accessible by everything?
Or am I misunderstanding how the keyword “static” works?
On a sidenote, on what magic do static classes work? I did some experimenting by building the menu system pages as individual script files. Each page is a static class and they sit in the project folder (aka the place where stuff sits dormant until called by a script or dragged to the scene by yourself) and I have this testing gameObject that has a menuSystem script attached to it that calls for the individual scripts sitting the project folder (e. g. the menu pages are not attached to the gameObject, just sitting in the project view).
It works great, but I’m completely confused to as how do I pass information from one menu page to another and how exactly do static methods and variables work within unity. And more importantly, why does it work this way? Where do the menu page scripts exist if the script that has their execution is sitting the project view, only called by a scripted gameObject in the scene?
I know where the script that calls the menu pages is (attached to an empty gameObject in the scene), but where are the static menu pages scripts existing then? I figured nothing does anything in the project view, because its a just a place for dormant assets.
Man, maybe I’m just making this too complicate, but I’m confused as hell.
Not only that, but it seems everyone recommends using C# instead of UnityScript, so I need to relearn the way to code too. Gah.