Method and system for configuring data based on presentation layer
By introducing methods and systems based on the performance layer configuration data in the game development, the configuration efficiency and error problems caused by different configuration formats caused by different UI control display formats are solved, and automated configuration data processing is realized, and development efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202310919846.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2025-01-28
AI Technical Summary
In game development, due to the different display formats of UI controls in each engine, the text data configured in the configuration system is not displayed in the engine in the UI controls. It is necessary to manually adjust the control format in the engine and copy it to the configuration system. Low and error-prone.
Provide a method and its system based on the expression layer configuration data and its system. By adding the trigger button to the editor of the engine UI control, the editor and recorded the data format, and automatically write the format to the format to the corresponding format into the configuration system through the loader and the HSSFWORKBOOK library function. Configuration table and field.
It improved the configuration and modification efficiency, reduced the probability of errors, and significantly accelerated the project progress.
Smart Images

Figure CN119376806A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of engine UI control configuration, and in particular relates to a method and a system thereof based on presentation layer configuration data. Background Art
[0002] In game development, it is often necessary to configure data (such as text data) such as UI controls in the engine. Since engine controls such as UI text controls in the engine have independent display formats (inconsistent indentation and line breaks in each engine, etc.), the text data configured in the configuration system (such as Excel) is not displayed as desired in the UI controls in the engine (such as where the indentation in the text starts and where the line breaks start, etc.). A more convenient way is to write the content in the desired format in the corresponding control in the engine (such as the UI text control) (such as where to indent, wrap, change color, etc.) and then copy the written content to the corresponding field in the corresponding configuration system. On the one hand, it takes extra time for the program to assign values to which configuration table and which field for the control, and on the other hand, it is also necessary to find the corresponding configuration table and field in the configuration system, which is relatively inefficient. Summary of the invention
[0003] In order to solve the above problems, the purpose of the present invention is to provide a method and system for configuring data based on the presentation layer, which automatically stores the display format of the set data into the field under the corresponding configuration table in the corresponding configuration system.
[0004] The technical solution of the present invention is as follows:
[0005] A method for configuring data based on a presentation layer, the method comprising the following steps:
[0006] Step 1: Generate a loader. This loader is generated when configuring any configuration table and is used to load the data of the configuration table. When the loader is generated, a file path field where the configuration table is located is added;
[0007] Step 2: Add a trigger button in the editor of the engine UI control to write the edited data into the corresponding configuration table. When the button is triggered, the edited data is written into the corresponding configuration table;
[0008] Step 3: Edit the data format of the engine UI control;
[0009] Step 4: trigger the button, find out the configuration table for setting the data format of the engine UI control and the corresponding fields in the configuration table in the UI control script where the engine UI control is located, and record the table name and field name;
[0010] Step 5: Find the corresponding configuration table and fields in the folder;
[0011] Step 6: Write the data format edited in the engine UI control in step 3 into the corresponding configuration table and field in the folder in step 5.
[0012] Furthermore, step 2 is further specified as follows: in the editor of the engine UI control, a trigger button is added to write the edited data into the corresponding table, and an editing class containing the trigger button is added to the lower part of the class of the engine UI control. If the UI control management class has secondary encapsulation, it can also be integrated into the UI control management class.
[0013] Furthermore, step 4 is further specified as follows: searching for the configuration table for setting the data format of the engine UI control and the corresponding fields in the configuration table in the UI control script where the engine UI control is located, that is, searching for the table name and table field name for setting data for the engine UI control line by line in the UI control script according to the UI control name, table name, and table field name, and recording them.
[0014] Furthermore, step 5 is further specified as follows: obtaining the configuration table and fields in the folder through the HSSFWorkbook library function and the file path field, table name and field name in the configuration table.
[0015] A system based on presentation layer configuration data, the system comprising: a file path storage module, a button generation module, an editing module, a trigger module, a search module, and a writing module;
[0016] The file path storage module is used to generate a loader, which is generated when any configuration table is configured and is used to load the data of the configuration table. When the loader is generated, a file path field where a configuration table is located is added;
[0017] The button generation module is used to add a trigger button for writing edited data into the corresponding configuration table in the editor of the engine UI control, and the edited data is written into the corresponding configuration table when the button is triggered;
[0018] The editing module is used to edit the data format of the engine UI control;
[0019] The trigger module is used to trigger the button by finding the configuration table for setting the data format of the engine UI control and the corresponding fields in the configuration table in the UI control script where the engine UI control is located, and recording the table name and field name;
[0020] The search module is used to search for corresponding configuration tables and fields in the folder;
[0021] The writing module is used to write the data format edited in the engine UI control in the editing module into the corresponding configuration table and field in the folder in the search module.
[0022] Furthermore, the button generation module is further specified as follows: a trigger button is added in the editor of the engine UI control to write the edited data into the corresponding table, and an editing class containing the trigger button is added to the lower part of the engine UI control class. If the UI control management class has secondary encapsulation, it can also be integrated into the UI control management class.
[0023] Furthermore, the trigger module is further specified as follows: searching for the configuration table for setting the data format of the engine UI control and the corresponding fields in the configuration table in the UI control script where the engine UI control is located, that is, searching for the table name and table field name for setting data for the engine UI control line by line in the UI control script according to the UI control name, table name, and table field name, and recording them.
[0024] Furthermore, the search module is further specified as follows: obtaining the configuration table and fields in the folder through the HSSFWorkbook library function and the file path field, table name and field name in the configuration table.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] The present invention uses a method based on presentation layer configuration data and a system thereof to automatically trace configuration data in a configuration system based on presentation layer configuration data, thereby improving configuration and modification efficiency, reducing error probability, and effectively accelerating project progress. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a schematic diagram of the process of the present invention;
[0028] Figure 2 This is the structural block diagram of the system. DETAILED DESCRIPTION
[0029] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0030] See also Figure 1 , a method for configuring data based on a presentation layer, the method comprising the following steps:
[0031] Step 1: Generate a loader. This loader is generated when configuring any configuration table and is used to load the data of the configuration table. When the loader is generated, a file path field where the configuration table is located is added;
[0032] Step 2: Add a trigger button in the editor of the engine UI control to write the edited data into the corresponding configuration table. When the button is triggered, the edited data is written into the corresponding configuration table;
[0033] This function is a built-in function of the engine, that is, the editor of the UI control. The usage method in this case is: (1) rewrite the UI control to inherit the UI control of the original engine; (2) define an editor for the rewritten UI control; (3) the newly defined editor retains the editor of the original UI control and adds a button editing function to the new editor.
[0034] Step 3: Edit the data format of the engine UI control;
[0035] Step 4: trigger the button, find out the configuration table for setting the data format of the engine UI control and the corresponding fields in the configuration table in the UI control script where the engine UI control is located, and record the table name and field name;
[0036] Step 5: Find the corresponding configuration table and fields in the folder;
[0037] Step 6: Write the data format edited in the engine UI control in step 3 into the corresponding configuration table and field in the folder in step 5.
[0038] The engine in the present invention is Unity3d engine.
[0039] The present invention will be further described below in conjunction with a specific embodiment:
[0040] A method based on presentation layer configuration data, the method comprising:
[0041] Step 1: The configuration system generates a loader for each configuration table. The loader is used to load the data of the configuration table. The loader is usually automatically generated using the configuration system tool. A field is added to the loader of each configuration table, and the field stores the file path of the configuration table.
[0042] The configuration system is a system that provides configuration data to planners or artists in each game development, and is an existing technology for games.
[0043] Step 2: Add a trigger button in the editor of the engine UI control that can write the edited data to the corresponding configuration table; that is, add an editing class containing a trigger button at the bottom of the engine UI control class. If the UI control management class has secondary encapsulation, it can also be integrated into the UI control management class;
[0044] Step 3: When the engine is not running, edit the display form of a UI control in the UI panel according to the desired format, such as specific indentation, line wrapping, color change, adding spaces, etc.
[0045] Step 4: Search for the configuration table and corresponding fields in the configuration table for setting the data format of the engine UI control in the UI control script (such as the Lua script) where the engine UI control is located. That is, search for the table name and table field name for setting data for the engine UI control line by line in the UI control script according to the UI control name, table name, and table field name, and record them.
[0046] Step 5: Through the HSSFWorkbook library function and the file path field, table name and field name in the configuration table, obtain the Excel configuration table and fields in the configuration system folder, add NPOI references, add namespaces, and call the internal functions of HSSFWorkbook to write the edited text or other content with the engine-specific format display effect into the Excel table and the corresponding tables and fields of the configuration system.
[0047] See also Figure 2 ,In the present invention, a system based on presentation layer configuration data includes: a file path storage module, a button generation module, an editing module, a trigger module, a search module, and a writing module;
[0048] The file path storage module is used to add a file path field where a configuration table is located while generating a loader for configuring any configuration table;
[0049] The button generation module is used to add a trigger button for writing edited data into the corresponding configuration table in the editor of the engine UI control, and the edited data is written into the corresponding configuration table when the button is triggered;
[0050] The editing module is used to edit the data format of the engine UI control;
[0051] The trigger module is used to trigger the button by finding the configuration table for setting the data format of the engine UI control and the corresponding fields in the configuration table in the UI control script where the engine UI control is located, and recording the table name and field name;
[0052] The search module is used to search for corresponding configuration tables and fields in the folder;
[0053] The writing module is used to write the data format edited in the engine UI control in the editing module into the corresponding configuration table and field in the folder in the search module.
[0054] In another embodiment of the present invention, the button generation module is further specified as follows: a trigger button for writing the edited data into the corresponding table is added in the editor of the engine UI control, and an editing class containing the trigger button is added to the lower part of the class of the engine UI control. If the UI control management class has secondary encapsulation, it can also be integrated into the UI control management class.
[0055] In one embodiment of the present invention, the trigger module is further specified as follows: searching for a configuration table for setting the data format of the engine UI control and corresponding fields in the configuration table in the UI control script where the engine UI control is located, that is, searching for the table name and table field name for setting data for the engine UI control line by line in the UI control script according to the UI control name, table name, and table field name, and recording them.
[0056] On the basis of the previous embodiment, the search module is further specified as follows: obtaining the configuration table and fields in the folder through the HSSFWorkbook library function and the file path field, table name and field name in the configuration table.
[0057] In game development, the performance effect data of each engine UI control is different. Usually, a more convenient method is to adjust the effect in the corresponding control in the engine, and then copy the adjusted effect data to the corresponding field of the corresponding table in the configuration system. Such adjustments are usually more frequent. The present invention improves the configuration and modification efficiency, reduces the error probability, and speeds up the project progress.
[0058] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method based on presentation layer configuration data, characterized in that: The method comprises the following steps: Step 1: Generate a loader. This loader is generated when configuring any configuration table and is used to load the data of the configuration table. When the loader is generated, a file path field where the configuration table is located is added; Step 2: Add a trigger button in the editor of the engine UI control to write the edited data into the corresponding configuration table. When the button is triggered, the edited data is written into the corresponding configuration table; Step 3: Edit the data format of the engine UI control; Step 4: trigger the button, find out the configuration table for setting the data format of the engine UI control and the corresponding fields in the configuration table in the UI control script where the engine UI control is located, and record the table name and field name; Step 5: Find the corresponding configuration table and fields in the folder; Step 6: Write the data format edited in the engine UI control in step 3 into the corresponding configuration table and field in the folder in step 5.
2. A method based on presentation layer configuration data according to claim 1, characterized in that: Step 2 is further specified as follows: in the editor of the engine UI control, add a trigger button that writes the edited data into the corresponding table, and add an editing class containing the trigger button at the bottom of the engine UI control class. If the UI control management class has secondary encapsulation, it can also be integrated into the UI control management class.
3. A method based on presentation layer configuration data according to claim 2, characterized in that: Step 4 is further specified as follows: searching for the configuration table and corresponding fields in the configuration table for setting the data format of the engine UI control in the UI control script where the engine UI control is located, that is, searching for the table name and table field name for setting data for the engine UI control line by line in the UI control script according to the UI control name, table name, and table field name, and recording them.
4. A method based on presentation layer configuration data according to claim 3, characterized in that: Step 5 is further specified as follows: obtaining the configuration table and fields in the folder through the HSSFWorkbook library function and the file path field, table name and field name in the configuration table.
5. A system based on presentation layer configuration data, characterized in that: The system comprises: a file path storage module, a button generation module, an editing module, a trigger module, a search module, and a writing module; the file path storage module is used to generate a loader, which is generated when any configuration table is configured and is used to load the data of the configuration table. When the loader is generated, a file path field where a configuration table is located is added; The button generation module is used to add a trigger button for writing edited data into the corresponding configuration table in the editor of the engine UI control, and the edited data is written into the corresponding configuration table when the button is triggered; the editing module is used to edit the data format of the engine UI control; The trigger module is used to trigger the button by finding the configuration table for setting the data format of the engine UI control and the corresponding fields in the configuration table in the UI control script where the engine UI control is located, and recording the table name and field name; The search module is used to search for corresponding configuration tables and fields in the folder; The writing module is used to write the data format edited in the engine UI control in the editing module into the corresponding configuration table and field in the folder in the search module.
6. A system based on presentation layer configuration data according to claim 5, characterized in that: The button generation module is further specified as follows: adding a trigger button in the editor of the engine UI control to write the edited data into the corresponding table, adding an editing class containing the trigger button at the bottom of the engine UI control class, and if the UI control management class has secondary encapsulation, it can also be integrated into the UI control management class.
7. A system based on presentation layer configuration data according to claim 6, characterized in that: The trigger module is further specified as follows: searching for the configuration table and the corresponding fields in the configuration table for setting the data format of the engine UI control in the UI control script where the engine UI control is located, that is, searching for the table name and table field name for setting data for the engine UI control line by line in the UI control script according to the UI control name, table name, and table field name, and recording them.
8. A system based on presentation layer configuration data according to claim 7, characterized in that: The search module is further specified as follows: obtaining the configuration table and fields in the folder through the HSSFWorkbook library function and the file path field, table name and field name in the configuration table.