How to store large variables and store them permanently?
Hey, I create a simple clicker, but I can not solve a few problems. 1. How to store a number greater than 3.402823E + 38. For now I kept the number of points in the float. 2. How then save this number of teeth when you exit the game does not sotała deleted. For now stotoswałem PlayerPrefs (http://docs.unity3d.com/ScriptReference/PlayerPrefs.html)
Please help if something is not understood sorry. I program in C#
use double ins$$anonymous$$d of float. I didn't understand the rest.
What are you storing that requires such a large value? And for saving when exiting the game you can use JSON or another method to save to a local file in the game's folder (if it isn't web-based), this seems to be useful as it's been mentioned a few times in other answers: SerializeHelper
Answer by jemonsuarez · Sep 29, 2016 at 12:44 PM
Hi @TheBonZi you must use double instead of float for larger numbers, and please take a look at this asset to save your data across almost every platform in Unity.
File Management: Easy way to save and read files.
Best regards.
Your answer
Follow this Question
Related Questions
Why woud i use var in C# ? 1 Answer
Variable being reset to default after being set 1 Answer
What are some best practices for static variables in multiplayer? 0 Answers
Referencing floating variables from another script? C# 0 Answers
how to Add a Certain Amount into a Variable From another Script Unity 2 Answers