In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The preservation of data files is often involved in Unity development. Except for the permanent storage of string, integer, and floating-point data by the PlayerPrefs class that comes with Unity. We will learn how to save data using a database in the next few chapters.
In this section, we first learn how to create and add data to the sqlite file in the editor. First, we need to download the sqlite file editor. Here is the download URL
Http://rj.baidu.com/soft/detail/22353.html?ald
We can simply click on the normal download and select the path to install it. After the installation, when we double-click to open it, we will see this screen: as shown in the figure
We can use OK directly if we choose it directly. The first option is the paid version, and the difference between the two is how much data is stored.
Click ok, as shown in the figure:
On the right is the original file. We select the first New SQlite Database on the left, then define the name ourselves and then determine it. As shown in the figure:
In the upper-left corner of the window is the file name we defined, newdata.sqlite. We do not introduce the menu bar, which is basically the same as other software. There are five options under the first Design in the function bar, table, system, and so on.
We learn about the creation of tables, namely table. There is a "+" sign in the lower left corner. We can create a new table by clicking directly. As shown in the figure:
We first fill in the name of the form in the tabular editor. For example, position.
Here are the field names and values that define our table. That is, what is needed in the form. Add through the "+" sign at the bottom left
Such as name, height, gender, weight and so on. These all belong to the names of the data. For example, in the item Name, we fill in GameObejct.
The type on the right refers to the type of the field value. Such as text,int,floa,time and so on. We can choose text directly here.
On the far right is Constraints. It means restrictions. Restrictions on data. For example, whether it is unique, whether it can be empty, whether there is a default value, and so on.
As shown in the figure: we can record the position of an object according to the three variables of xyz.
Of course, if you want to cancel one. We can select this item first, and then click the "-" sign. After the creation, we can click Create directly. As shown in the figure:
We select the function bar Data, and then select the new form position.
The "+" sign appears at the bottom of the right window. After clicking, you can add data.
As shown in the picture
Select an item and fill in the corresponding type of data in the window below. Floating-point values do not have to add f. After adding, click Save. As shown in the picture
Multiple data can be added in the same way. We'll stop here in this section. In the next section, we will talk about how to use SQL statements to add or delete data.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.