AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Unity saving system1/26/2024 ![]() This can be perceived as a very crude way of storing and accessing the data across your scenes. It is entirely possible to write a public static class and access all it’s primitive components and member functions from any script in your scenes. This one should be pretty obvious, but I noticed that some developers are not aware of it. I’ll try my best to structure this article to act as a reference point whenever you find yourself stuck with your project. In this section I will focus on the main commonly used solutions for data persistence in Unity games. Let me describe all the possible solutions that are commonly known to the best of my knowledge. Each of them comes with pros and cons and it depends on what kind of data you want to preserve. There are multiple ways of dealing with this problem. ![]() Similarly, the same principle applies whenever you start / stop the game. The way Unity deals with any kind of Object, especially Component or GameObject type instances, is that it destroys them every time you transit from one scene to another. However, that is not the case and you will still be faced with losing the data. ![]() One may think that this can be easily solved by marking any of these objects as static. All scripts and components that are attached to GameObject inside a Unity project are destroyed each time you load a scene. In order to tackle the problem, let’s first define it.
0 Comments
Read More
Leave a Reply. |