- Home /
[C#] Collect Key Fragments to unlock door, and Save Progress.
Hey there! I've had the idea of the Hub world of my platformer game to have a seperate door for each level. In order to open the door, you need to find all four pieces of the key. I need the GUI to look like this: and to fill in as you collect the key fragments: And then also, how would I get it to save progress so you don't have to do it again next time you play? Many thanks to all who try and help! :) [I realize this might be complicated, or maybe just a simple public variable thing.]
Answer by zaid87 · Dec 19, 2014 at 01:55 AM
Simplest way would probably be to use PlayerPrefs:
http://docs.unity3d.com/ScriptReference/PlayerPrefs.html
Whenever the player gets a key fragment, just save it in PlayerPrefs. And when you enter the game again just load the values from it.
Your answer
Follow this Question
Related Questions
How to open a gate with a key ? 1 Answer
Press an in-game switch to open a door - help? 2 Answers
GUI text, door and object collider 2 Answers
Key to open door not working. 1 Answer
Open door with key 1 Answer