|
1 | | -## Предисловие |
| 1 | +## Preface |
2 | 2 |
|
3 | | -Базовая информация о работе конструктора: |
| 3 | +Basic information about the Data Constructor: |
4 | 4 |
|
5 | | -- Конструктор работает с JSON данными: Templates, Data, Localizations, Logs и другие |
6 | | -- Поддерживает сохранение созданных данных: |
7 | | - - Локально (Assets/Data Constructor) |
8 | | - - Облачно (в настоящее время поддерживается только Firebase Realtime Database) |
9 | | -- Ссылки на Unity ресурсы (изображения, звуки, модели и другие ресурсы проекта) хранятся в системном Scriptable Object для включения в билд |
10 | | -- Управление ресурсами доступно во вкладке **Resources** |
| 5 | +- The constructor works with JSON data: Templates, Data, Localizations, Logs, and more. |
| 6 | +- Supports saving created data: |
| 7 | + - Locally (Assets/Data Constructor) |
| 8 | + - Cloud (currently only Firebase Realtime Database is supported) |
| 9 | +- References to Unity assets (images, sounds, models, and other project resources) are stored in a system Scriptable Object for inclusion in the build. |
| 10 | +- Asset management is available in the **Resources** tab. |
11 | 11 |
|
12 | | -**Data** представляет собой список экземпляров, реализующих выбранный **Template** |
13 | | -- Вы можете создавать неограниченное количество **Data** для любого **Template** |
| 12 | +**Data** represents a list of instances based on a chosen **Template**. |
| 13 | +- You can create an unlimited number of **Data** instances for any **Template**. |
14 | 14 |
|
15 | | -## Установка |
| 15 | +## Installation |
16 | 16 |
|
17 | | -### Установка Addressables (обязательно) |
| 17 | +### Addressables Installation (required) |
18 | 18 |
|
19 | | -1. Откройте `Window > Package Manager` |
20 | | -2. Переключитесь на представление `Unity Registry` |
21 | | -3. Найдите `Addressables` и нажмите `Install` |
| 19 | +1. Open `Window > Package Manager`. |
| 20 | +2. Switch to the `Unity Registry` view. |
| 21 | +3. Find `Addressables` and click `Install`. |
22 | 22 |
|
23 | | -### Установка плагина |
| 23 | +### Plugin Installation |
24 | 24 |
|
25 | | -Скопируйте папку `Plugin` в вашу папку `Assets` |
| 25 | +Copy the `Plugin` folder into your `Assets` folder. |
26 | 26 |
|
27 | | -## Инициализация при запуске игры |
| 27 | +## Initialization on Game Start |
28 | 28 |
|
29 | | -Для инициализации редактора в момент запуска игры вызовите: |
| 29 | +To initialize the editor at runtime, call: |
30 | 30 |
|
31 | 31 | ```csharp |
32 | 32 | DataConstructor.Initializer.Init(); |
33 | 33 | ``` |
34 | | -Там будут списке ваших данных, они будут иметь те же название что вы создавали в Data, и наследоваться от классов которые вы создавали в Template |
| 34 | +Your data lists will appear there, using the same names you created in `Data`, and they will inherit from the classes defined in your `Templates`. |
35 | 35 |
|
| 36 | +## First Launch |
36 | 37 |
|
37 | | -## Первый запуск: ## |
38 | | -Найди в вернем тул баре `Data Constructor`, затем нажмите `Launch` |
| 38 | +Find `Data Constructor` in the top toolbar and click `Launch`: |
39 | 39 | <img width="903" height="57" alt="image" src="https://github.com/user-attachments/assets/08e17ac6-c2b6-4b7a-b265-bf57a376f808" /> |
40 | | -Запустится редактор, он автоматически создаст нужные ему папки |
41 | | -У вас будет несколько вкладок, пока нам нужны только: `Templates` и `Data` |
42 | 40 |
|
| 41 | +The editor will start and automatically create the required folders. |
| 42 | +You will see several tabs; for now, we only need: `Templates` and `Data`. |
43 | 43 |
|
44 | | -### 1. Первый Template ### |
45 | | - <img width="1900" height="208" alt="image" src="https://github.com/user-attachments/assets/e31d3dd8-f963-47b0-8f83-647fca568cb8" /> |
46 | | - Перейдите во вкладку `Template` |
| 44 | +### 1. Creating the First Template |
| 45 | +<img width="1900" height="208" alt="image" src="https://github.com/user-attachments/assets/e31d3dd8-f963-47b0-8f83-647fca568cb8" /> |
47 | 46 |
|
48 | | - <img width="1877" height="862" alt="image" src="https://github.com/user-attachments/assets/3e3fab61-3a76-449e-b27c-d32b72570382" /> |
49 | | - 1.Найдите `Create` левой панели (там будут все ваши классы) |
50 | | - 2. После нажатия, вам откроется окно в котором вы можете заполнить данные, пока нам хватит только названия |
51 | | - После создания вы можете открыть созданный вами `Template` |
| 47 | +Go to the `Templates` tab: |
| 48 | +<img width="1877" height="862" alt="image" src="https://github.com/user-attachments/assets/3e3fab61-3a76-449e-b27c-d32b72570382" /> |
52 | 49 |
|
53 | | - <img width="1918" height="895" alt="image" src="https://github.com/user-attachments/assets/3e8993f3-4643-4ec2-8e46-e9396bd94836" /> |
54 | | - 3.нажмите `Add Field` |
55 | | - 4.Заполните данные поля, выберите из списка списка тип поля, который вам нужен |
| 50 | +1. Find `Create` on the left panel (this contains all your classes). |
| 51 | +2. Click it, and a window will open where you can fill in the data (for now, only the name is required). |
| 52 | +3. After creation, open the `Template` you just created: |
| 53 | +<img width="1918" height="895" alt="image" src="https://github.com/user-attachments/assets/3e8993f3-4643-4ec2-8e46-e9396bd94836" /> |
56 | 54 |
|
57 | | - Ваш `Template` создан. |
| 55 | +4. Click `Add Field`. |
| 56 | +5. Fill in the field data and select the desired field type from the list. |
58 | 57 |
|
| 58 | +Your **Template** is now created. |
59 | 59 |
|
60 | | -### 2. Первый Data ### |
61 | | - Перейдите во вкладку Data |
62 | | - <img width="1892" height="859" alt="image" src="https://github.com/user-attachments/assets/f4d61e40-7936-4e62-9a6a-34222040efbd" /> |
63 | | - 1. нажмите `Create` |
64 | | - 2. Заполните данные (выберите тот Template который вы создали) |
65 | | - 3. Найдите его в левой панели |
66 | | - <img width="1894" height="550" alt="image" src="https://github.com/user-attachments/assets/7be7f1fb-8a6f-4fef-9938-e696eb0f08da" /> |
67 | | - нажмите `Add Entry`, создастся экземпляр класа, вы можете его заполнить необходимыми данными. |
68 | | - После сделанных изменений можете нажать `Save` или `Reset`. |
| 60 | +### 2. Creating the First Data |
| 61 | +Go to the `Data` tab: |
| 62 | +<img width="1892" height="859" alt="image" src="https://github.com/user-attachments/assets/f4d61e40-7936-4e62-9a6a-34222040efbd" /> |
69 | 63 |
|
| 64 | +1. Click `Create`. |
| 65 | +2. Fill in the data (select the Template you created). |
| 66 | +3. Find it in the left panel: |
| 67 | +<img width="1894" height="550" alt="image" src="https://github.com/user-attachments/assets/7be7f1fb-8a6f-4fef-9938-e696eb0f08da" /> |
70 | 68 |
|
71 | | -### 3. Первый Deploy ### |
72 | | - Перейдите во вкладку `Deploy` |
73 | | - <img width="1897" height="624" alt="image" src="https://github.com/user-attachments/assets/62a30f6c-2b74-4671-bdfd-447246f8e3ff" /> |
| 69 | +4. Click `Add Entry` to create a class instance, which you can then fill with the required data. |
| 70 | +5. After making changes, click `Save` or `Reset`. |
74 | 71 |
|
75 | | - 1. Deploy делает генерацию созданных данных и классов под них. |
76 | | - 2. Нажмите эту кнопку и дожитесь окончания компиляции |
77 | | - 3. После этого у вас в коде появится доступ к вашим данным заполненным данным (пример: IReadOnlyList<TestTemplate> testData = DataConstructor.DataManager.TestData;). |
| 72 | +### 3. First Deploy |
| 73 | +Go to the `Deploy` tab: |
| 74 | +<img width="1897" height="624" alt="image" src="https://github.com/user-attachments/assets/62a30f6c-2b74-4671-bdfd-447246f8e3ff" /> |
| 75 | + |
| 76 | +1. `Deploy` generates classes and data from your created entries. |
| 77 | +2. Click the button and wait until compilation finishes. |
| 78 | +3. After that, your data becomes accessible in code (example: |
| 79 | +```csharp |
| 80 | +IReadOnlyList<TestTemplate> testData = DataConstructor.DataManager.TestData; |
| 81 | +``` |
78 | 82 | |
79 | | -Вы прошли ознокомительный этап по работе с конструктором, остальную более детальную документацию я напишу в других разделах |
| 83 | +You have passed the chilling stage of working with the constructor, I will write the rest of the more detailed documentation in other sections. |
0 commit comments