0
\$\begingroup\$

In my game main character can move using tap or hold finger on the screen. I wanna create at the menu options, and there button to change control type. How I can save player choose? Using Prefs?

\$\endgroup\$
1
\$\begingroup\$

What input mode to use is a typical player preference. As such, it should be saved in the PlayerPrefs class. PlayerPrefs is a key/value store. It allows you to store and retrieve variables (int, float or string) under string-keys of your choice. It uses a platform-appropriate persistent storage method, so it doesn't just survive scene reloads but also closing and relaunching the whole game application.

\$\endgroup\$
  • \$\begingroup\$ Where can I find some information about this? Can you give me a link or something? \$\endgroup\$ – Andrey Dubchak Oct 6 '16 at 21:55
  • \$\begingroup\$ @AndreyDubchak I already gave you a link in my answer. The documentation should tell you everything you need to know. When you have trouble understanding it, please ask a new question. \$\endgroup\$ – Philipp Oct 6 '16 at 21:59
  • \$\begingroup\$ That link is all the information you should need in order to understand how to use PlayerPrefs. \$\endgroup\$ – jgallant Oct 7 '16 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.