A Unity-based graphics rendering method, system, storage medium and device
By acquiring the XCharts development kit and the Unity engine to create a project, build a new drawing scene, and set up graphical elements, the problem of high barriers to entry for graphics drawing development in Unity was solved, achieving efficient, real-time graphics generation and interactivity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 江西格如灵科技有限公司
- Filing Date
- 2024-08-23
- Publication Date
- 2026-04-17
AI Technical Summary
When drawing graphics in Unity, existing technologies require developers to be familiar with the XCharts API and complex interface editing, resulting in high development barriers and low efficiency.
By acquiring the XCharts development kit, creating a project based on the Unity engine, creating a new drawing scene, creating UI components based on image sources, adding code components in the properties panel, setting color values, coordinate values and graphic forms, and generating the target graphic in real time.
It reduces the amount of code developers need to write, improves development efficiency, enables real-time rendering and interactivity of target graphics, and enhances the accuracy of graphics drawing.
Smart Images

Figure CN119336317B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of graphics rendering technology, and specifically to a graphics rendering method, system, storage medium, and device based on Unity. Background Technology
[0002] In existing technologies, drawing graphics in Unity requires developers to construct the image themselves and then call the underlying UGUI for drawing, which is a complex process with a high development threshold.
[0003] However, developers face several challenges when using XCharts for chart drawing. First, they need to be familiar with XCharts' API and complex interface editing, and write complex code to process and use it. Second, drawing charts not pre-built into XCharts requires knowledge of computer graphics, making the development threshold relatively high.
[0004] Therefore, existing technologies suffer from high development barriers and low efficiency due to the need to construct images or understand computer graphics when drawing graphics. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method, system, storage medium and device for rendering the surface skin of a three-dimensional model, which aims to solve the problems of high development threshold and low efficiency caused by the need to construct images or understand computer graphics when drawing graphics in the prior art.
[0006] A first aspect of the present invention is to provide a Unity-based graphics rendering method, the method comprising:
[0007] Obtain an XCharts development toolkit, which includes the XCharts main program;
[0008] Based on the XCharts main program, create a Unity project using the Unity engine;
[0009] Create a new drawing scene in the Unity project;
[0010] Identify the drawing scene and create a UI component based on the image source within the drawing scene;
[0011] Add a code component to the properties panel of the Unity project;
[0012] Load the code component, and set the color values, coordinate values, and graphic form of the Unity project in the source code based on the code component;
[0013] Based on the color value, coordinate value, and graphic form, the target graphic is generated in real time according to the rendering of the UI component.
[0014] According to one aspect of the above technical solution, the step of identifying the drawing scene and creating a UI component based on an image source in the drawing scene specifically includes:
[0015] Load the rendering scene into the Unity project and identify the scene identifier of the rendering scene;
[0016] Based on the scene identifier, a UI component based on the image source is created in the drawing scene.
[0017] According to one aspect of the above technical solution, the steps of loading the code component and setting the color values, coordinate values, and graphic form of the Unity project in the source code based on the code component specifically include:
[0018] Load the code component and retrieve the source code data provided by the code component;
[0019] Identify the characteristic codes in the source code data, and edit the characteristic codes in the source code based on the code component to set the color values, coordinate values and graphic forms of the Unity project.
[0020] According to one aspect of the above technical solution, the steps of identifying feature codes in the source code data, and editing the feature codes in the source code based on the code component to set the color values, coordinate values, and graphic form of the Unity project specifically include:
[0021] Simulate the source code in the source code data to identify several characteristic variables in the source code;
[0022] The target feature variables in the source code are selected by filtering several of the feature variables.
[0023] The source code corresponding to the target feature variables is determined as the feature code;
[0024] In the code component, the feature code is edited to set the color values, coordinate values, and graphic format of the Unity project.
[0025] According to one aspect of the above technical solution, the step of editing the feature code in the code component to set the color values, coordinate values, and graphic form of the Unity project specifically includes:
[0026] In the code component, the first feature code in the feature code is edited, including setting RGB values in the first feature code to set the color values of the Unity project;
[0027] Editing the second feature code in the feature code includes setting a code in the second feature code corresponding to the graphic form determined based on pre-defined rules;
[0028] And editing the third feature code in the feature code, including setting multiple coordinate values of the graphic form corresponding to the graphic in the third feature code.
[0029] According to one aspect of the above technical solution, editing the second feature code in the feature code includes the step of setting a code corresponding to a graphic form determined based on pre-defined rules in the second feature code, including:
[0030] The second feature code sets codes corresponding to multiple image styles determined based on pre-defined rules.
[0031] According to one aspect of the above technical solution, the method further includes:
[0032] When the target graphic is generated in real time based on the rendering of the UI component, if the real-time rendering is stuttered, the second feature code and the third feature code are detected, and the fault description data of the second feature code and / or the third feature code is output. Then, the second feature code and / or the third feature code are repaired based on the fault description data.
[0033] A second aspect of the present invention is to provide a Unity-based graphics rendering system, applied to the method described in the above-mentioned technical solution, the system comprising:
[0034] The program acquisition module is used to acquire an XCharts development toolkit, which includes the XCharts main program.
[0035] The project creation module is used to create a Unity project based on the XCharts main program using the Unity engine.
[0036] The scene creation module is used to create a new drawing scene in the Unity project.
[0037] The UI creation module is used to identify the drawing scene and create UI components based on the image source in the drawing scene;
[0038] The code creation module is used to add code components to the property panel of the Unity project.
[0039] The code editing module is used to load the code component and set the color values, coordinate values, and graphic form of the Unity project in the source code based on the code component;
[0040] The graphics generation module is used to generate the target graphics in real time based on the color values, coordinate values, and graphic form of the UI component.
[0041] A third aspect of the present invention is to provide a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the methods described in the above-described technical solutions.
[0042] A fourth aspect of the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the method described in the above-described technical solutions.
[0043] Compared with existing technologies, the advantages of using the Unity-based graphics rendering method, system, storage medium, and device shown in this invention are as follows:
[0044] When drawing graphics using the method described in this invention, the XCharts development toolkit is obtained and a Unity project is created based on the Unity engine. Then, a drawing scene is created in the Unity project based on Unity's graphics drawing method. UI components based on image sources are then created in the drawing scene, and code components are added. Finally, by loading the code components, the color values, coordinate values, and graphic forms of the Unity project can be set in the source code. During the code execution, the target graphic is rendered and generated in real time based on the UI components. Therefore, the method shown in this embodiment reduces the amount of code that developers need to write, lowers the technical threshold, and can effectively improve development efficiency. Moreover, the generation of the target graphic is performed in real time, which can effectively improve interactivity and improve the accuracy of graphics drawing. Attached Figure Description
[0045] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0046] Figure 1 This is a flowchart illustrating a Unity-based graphics rendering method according to an embodiment of the present invention.
[0047] Figure 2 This is a structural block diagram of a Unity-based graphics rendering system according to an embodiment of the present invention. Detailed Implementation
[0048] To make the objectives, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of the present invention will be more thorough and complete.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0050] Example 1
[0051] Please see Figure 1 The first embodiment of the present invention provides a Unity-based graphics drawing method, the method comprising steps S10-S70:
[0052] Step S10: Obtain an XCharts development toolkit, which includes the XCharts main program.
[0053] In this embodiment, the XCharts development toolkit includes the XCharts main program, API, and sample code.
[0054] Specifically, the method shown in this embodiment is applied to a computer device. Before drawing graphics, the XCharts Development Kit should be downloaded and installed from the official XCharts website, and then the graphics drawing method should be executed based on the XCharts Development Kit.
[0055] Step S20: Based on the XCharts main program, create a Unity project using the Unity engine.
[0056] In this embodiment, after downloading and installing the XCharts development toolkit, the Unity game engine will be invoked to create a new Unity project.
[0057] Step S30: Create a new drawing scene in the Unity project;
[0058] Step S40: Identify the drawing scene and create a UI component based on the image source in the drawing scene.
[0059] In this embodiment, after creating a Unity project and a drawing scene based on the Unity project, the drawing scene will be automatically identified, and then UI components based on image source-driven methods will be created in the drawing scene.
[0060] The step of identifying the drawing scene and creating a UI component based on an image source within the drawing scene specifically includes:
[0061] Load the rendering scene into the Unity project and identify the scene identifier of the rendering scene;
[0062] Based on the scene identifier, a UI component based on the image source is created in the drawing scene.
[0063] Specifically, the method shown in this embodiment first loads a pre-created drawing scene in the Unity project when creating a UI component based on an image source, identifies the scene identifier of the drawing scene, and creates a UI component based on an image source in the drawing scene based on the scene identifier. The image source driving method is based on an image source, which is equivalent to calibrating the UI display interface used to draw graphics based on a reference source.
[0064] Step S50: Add a code component to the property panel of the Unity project.
[0065] In this embodiment, the code component shown is a code editing port for drawing graphics. The source code can be modified based on the code component to draw the target graphic. The target graphic is an arbitrary shape formed by geometric elements such as points, lines, and surfaces, such as circles, rectangles, and triangles.
[0066] Step S60: Load the code component, and set the color value, coordinate value and graphic form of the Unity project in the source code based on the code component.
[0067] In this embodiment, the steps of loading the code component and setting the color values, coordinate values, and graphic form of the Unity project in the source code based on the code component specifically include:
[0068] Load the code component and retrieve the source code data provided by the code component;
[0069] Identify the characteristic codes in the source code data, and edit the characteristic codes in the source code based on the code component to set the color values, coordinate values and graphic forms of the Unity project.
[0070] The steps of identifying feature codes in the source code data, and editing the feature codes in the source code based on the code components to set the color values, coordinate values, and graphic form of the Unity project, specifically include:
[0071] Simulate the source code in the source code data to identify several characteristic variables in the source code;
[0072] The target feature variables in the source code are selected by filtering several of the feature variables.
[0073] The source code corresponding to the target feature variables is determined as the feature code;
[0074] In the code component, the feature code is edited to set the color values, coordinate values, and graphic format of the Unity project.
[0075] Specifically, the step of editing the feature code within the code component to set the color values, coordinate values, and graphical form of the Unity project includes:
[0076] Specifically, in the code component, the first feature code in the feature code is edited, including setting RGB values in the first feature code to set the color values of the Unity project;
[0077] Editing the second feature code in the feature code includes setting a code in the second feature code corresponding to the graphic form determined based on pre-defined rules;
[0078] And editing the third feature code in the feature code, including setting multiple coordinate values of the graphic form corresponding to the graphic in the third feature code.
[0079] In this embodiment, when setting the color values, coordinate values, and graphic form of a Unity project based on the code component, the code component should be loaded first to retrieve the source code data provided by the code component. This source code data is general code for drawing graphics, including general code and sample code. The sample code is the feature code that needs to be identified in this embodiment. For the source code data, it is sample code, but for the specific graphic drawing, what needs to be modified is the data of this sample code to draw the graphics. Therefore, in this embodiment, the feature code for drawing graphics needs to be edited. By editing the feature code, the color values, coordinate values, and graphic form of the Unity project are set, thereby determining the graphic elements for drawing graphics through the editing of the feature code.
[0080] During implementation, after acquiring the source code data, the source code in the source code data will first be simulated to determine several characteristic variables in the source code, that is, to determine the variable code in the source code. Then, the characteristic variables that affect the generation of graphics will be filtered to select the target characteristic variables in the source code. The source code that corresponds to the target characteristic variables will be determined as the characteristic code. Finally, the characteristic variables will be edited in the code component, including editing the color values, coordinate values and graphic forms of the Unity project, so as to set the color values, coordinate values and graphic forms of the Unity project accordingly, so as to generate the corresponding target graphics based on the running of the code.
[0081] Specifically, driven by code components, the first feature code is edited, including setting RGB values in the first feature code, specifically setting the R, G, and B values. By setting the R, G, and B values, the color value is determined to present the corresponding color. Then, the second feature code is edited, including setting the code corresponding to the graphic form based on pre-determined rules. For example, the code variable for a straight line is 1, for a rectangle it is 2, and for a triangle it is 3. By determining the code corresponding to the graphic form, the graphic form can be set accordingly to present the corresponding graphic. Finally, the third feature code is edited, including setting the coordinate values corresponding to the graphic form in the third feature code. For example, a straight line is set with the coordinates of two endpoints, a triangle with the coordinates of three endpoints, and so on. Finally, through the re-editing of the first, second, and third feature codes, the graphic parameters required to draw the corresponding graphic are obtained.
[0082] Step S70: Based on the color value, coordinate value, and graphic form, generate the target graphic in real time according to the rendering of the UI component.
[0083] In this embodiment, the UI component is a pre-defined rendering interface. By setting feature codes and then running the re-edited code, the required target graphics can be rendered in real time based on the UI component.
[0084] For example, after setting the RGB values to black, the graphic form to a triangle, and the coordinates of the three endpoints in the feature code, the desired target graphic can be displayed in real time through the UI.
[0085] Of course, the target graphic to be rendered by the method shown in this embodiment will be slightly complex, but the target graphic is also based on several sub-graphics. Thus, multiple sets of code can be set to run to generate the target graphic in real time.
[0086] Compared with existing technologies, the Unity-based graphics rendering method shown in this embodiment has the following advantages:
[0087] The method described in this embodiment involves obtaining the XCharts development toolkit and creating a Unity project based on the Unity engine. Then, a drawing scene is created within the Unity project using Unity's drawing methods. UI components based on image sources are created within the drawing scene, along with code components. Finally, by loading the code components, the color values, coordinate values, and graphic format of the Unity project are set in the source code. During code execution, the target graphic is rendered in real-time based on the UI components. This method reduces the amount of code developers need to write, lowers the technical threshold, effectively improves development efficiency, and the real-time rendering of the target graphic enhances interactivity and improves the accuracy of graphic drawing.
[0088] Example 2
[0089] The second embodiment of the present invention also provides a Unity-based graphics drawing method, which is basically similar to the drawing method shown in the first embodiment, except that:
[0090] In this embodiment, if a lag occurs during real-time rendering of the target graphic based on the UI component, the second feature code and the third feature code are detected, and fault description data of the second feature code and / or the third feature code is output. Then, the second feature code and / or the third feature code are repaired based on the fault description data.
[0091] Specifically, after the feature codes in the source code data are edited by the code component, the UI component will execute the edited code according to the processor to control the UI component to render and generate the target graphics in real time. At the same time, the screen will be detected in real time, including the identification of screen frames. When the screen frame detects that the rendering is stuttering, the second feature code and the third feature code will be detected, and the fault description data of the second feature code and / or the third feature code will be output. The semantic recognition of the fault description data will be performed, and finally the second feature code and / or the third feature code will be repaired. Then, the repaired code will be re-executed based on the code component to ensure the real-time generation of graphics drawing.
[0092] Example 3
[0093] Please see Figure 2 A second embodiment of the present invention provides a Unity-based graphics rendering system, the system comprising:
[0094] The program acquisition module 10 is used to acquire an XCharts development toolkit, which includes the XCharts main program.
[0095] In this embodiment, the XCharts development toolkit includes the XCharts main program, API, and sample code.
[0096] Specifically, the method shown in this embodiment is applied to a computer device. Before drawing graphics, the XCharts Development Kit should be downloaded and installed from the official XCharts website, and then the graphics drawing method should be executed based on the XCharts Development Kit.
[0097] Project creation module 20 is used to create a Unity project based on the XCharts main program using the Unity engine.
[0098] In this embodiment, after downloading and installing the XCharts development toolkit, the Unity game engine will be invoked to create a new Unity project.
[0099] Scene creation module 30 is used to create a new drawing scene in the Unity project;
[0100] UI creation module 40 is used to identify the drawing scene and create UI components based on image sources in the drawing scene.
[0101] In this embodiment, after creating a Unity project and a drawing scene based on the Unity project, the drawing scene will be automatically identified, and then UI components based on image source-driven methods will be created in the drawing scene.
[0102] Among them, UI creation module 40 is used for:
[0103] Load the rendering scene into the Unity project and identify the scene identifier of the rendering scene;
[0104] Based on the scene identifier, a UI component based on the image source is created in the drawing scene.
[0105] Specifically, in the system shown in this embodiment, when creating a UI component based on the image source-driven method, the system first loads a pre-created drawing scene in the Unity project, identifies the scene identifier of the drawing scene, and creates a UI component based on the image source-driven method in the drawing scene based on the scene identifier. The image source-driven method is based on the Image source for driving, which is equivalent to calibrating the UI display interface used for drawing graphics based on the reference source.
[0106] Code creation module 50 is used to add code components to the property panel of the Unity project.
[0107] In this embodiment, the code component shown is a code editing port for drawing graphics. The source code can be modified based on the code component to draw the target graphic. The target graphic is an arbitrary shape formed by geometric elements such as points, lines, and surfaces, such as circles, rectangles, and triangles.
[0108] The code editing module 60 is used to load the code component and set the color value, coordinate value and graphic form of the Unity project in the source code based on the code component.
[0109] In this embodiment, the UI creation module 40 specifically includes:
[0110] Load the code component and retrieve the source code data provided by the code component;
[0111] Identify the characteristic codes in the source code data, and edit the characteristic codes in the source code based on the code component to set the color values, coordinate values and graphic forms of the Unity project.
[0112] Specifically, the UI creation module 40 includes:
[0113] Simulate the source code in the source code data to identify several characteristic variables in the source code;
[0114] The target feature variables in the source code are selected by filtering several of the feature variables.
[0115] The source code corresponding to the target feature variables is determined as the feature code;
[0116] In the code component, the feature code is edited to set the color values, coordinate values, and graphic format of the Unity project.
[0117] Specifically, the UI creation module 40 includes:
[0118] Specifically, in the code component, the first feature code in the feature code is edited, including setting RGB values in the first feature code to set the color values of the Unity project;
[0119] Editing the second feature code in the feature code includes setting a code in the second feature code corresponding to the graphic form determined based on pre-defined rules;
[0120] And editing the third feature code in the feature code, including setting multiple coordinate values of the graphic form corresponding to the graphic in the third feature code.
[0121] In this embodiment, when setting the color values, coordinate values, and graphic form of a Unity project based on the code component, the code component should be loaded first to retrieve the source code data provided by the code component. This source code data is general code for drawing graphics, including general code and sample code. The sample code is the feature code that needs to be identified in this embodiment. For the source code data, it is sample code, but for the specific graphic drawing, what needs to be modified is the data of this sample code to draw the graphics. Therefore, in this embodiment, the feature code for drawing graphics needs to be edited. By editing the feature code, the color values, coordinate values, and graphic form of the Unity project are set, thereby determining the graphic elements for drawing graphics through the editing of the feature code.
[0122] During implementation, after acquiring the source code data, the source code in the source code data will first be simulated to determine several characteristic variables in the source code, that is, to determine the variable code in the source code. Then, the characteristic variables that affect the generation of graphics will be filtered to select the target characteristic variables in the source code. The source code that corresponds to the target characteristic variables will be determined as the characteristic code. Finally, the characteristic variables will be edited in the code component, including editing the color values, coordinate values and graphic forms of the Unity project, so as to set the color values, coordinate values and graphic forms of the Unity project accordingly, so as to generate the corresponding target graphics based on the running of the code.
[0123] Specifically, driven by code components, the first feature code is edited, including setting RGB values in the first feature code, specifically setting the R, G, and B values. By setting the R, G, and B values, the color value is determined to present the corresponding color. Then, the second feature code is edited, including setting the code corresponding to the graphic form based on pre-determined rules. For example, the code variable for a straight line is 1, for a rectangle it is 2, and for a triangle it is 3. By determining the code corresponding to the graphic form, the graphic form can be set accordingly to present the corresponding graphic. Finally, the third feature code is edited, including setting the coordinate values corresponding to the graphic form in the third feature code. For example, a straight line is set with the coordinates of two endpoints, a triangle with the coordinates of three endpoints, and so on. Finally, through the re-editing of the first, second, and third feature codes, the graphic parameters required to draw the corresponding graphic are obtained.
[0124] The graphics generation module 70 is used to generate the target graphics in real time based on the rendering of the UI component according to the color value, coordinate value and graphic form.
[0125] In this embodiment, the UI component is a pre-defined rendering interface. By setting feature codes and then running the re-edited code, the required target graphics can be rendered in real time based on the UI component.
[0126] For example, after setting the RGB values to black, the graphic form to a triangle, and the coordinates of the three endpoints in the feature code, the desired target graphic can be displayed in real time through the UI.
[0127] Of course, the target graphic that the system in this embodiment needs to render will be slightly complex, but the target graphic is also based on several sub-graphics. Therefore, multiple sets of code can be set to run to generate the target graphic in real time.
[0128] Compared with existing technologies, the Unity-based graphics rendering system shown in this embodiment has the following advantages:
[0129] When using the system shown in this embodiment for graphics drawing, the XCharts development toolkit is obtained and a Unity project is created based on the Unity engine. Then, a drawing scene is created in the Unity project based on Unity's graphics drawing method. UI components based on image sources are then created in the drawing scene, and code components are added. Finally, by loading the code components, the color values, coordinate values, and graphic forms of the Unity project can be set in the source code. During the code execution, the target graphic is rendered and generated in real time based on the UI components. Therefore, the system shown in this embodiment reduces the amount of code that developers need to write, lowers the technical threshold, and can effectively improve development efficiency. Moreover, the generation of the target graphic is rendered in real time, which can effectively improve interactivity and improve the accuracy of graphics drawing.
[0130] Example 4
[0131] A fourth embodiment of the present invention provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the methods described in the above embodiments.
[0132] Example 5
[0133] A fifth embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the methods described in the above embodiments.
[0134] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0135] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A Unity-based graphics rendering method, characterized in that, The method includes: Obtain an XCharts development toolkit, which includes the XCharts main program; Based on the XCharts main program, create a Unity project using the Unity engine; Create a new drawing scene in the Unity project; Load the rendering scene into the Unity project and identify the scene identifier of the rendering scene; Based on the scene identifier, create a UI component based on the image source in the drawing scene. Add a code component to the properties panel of the Unity project; Load the code component and retrieve the source code data provided by the code component; The source code in the source code data is simulated to identify several characteristic variables in the source code in order to determine the variable code in the source code; The target feature variables in the source code are selected by filtering several of the feature variables. The source code corresponding to the target feature variables is determined as the feature code; The source code data consists of the code for drawing graphics, which includes general code and example code. The example code is the feature code that needs to be identified. The step of editing the feature code in the code component includes: In the first feature code of the feature code, RGB values are set to set the color values of the Unity project; In the second feature code of the feature code, a code corresponding to the graphic form is set based on a pre-determined rule; In the third feature code of the feature code, multiple coordinate values are set for the graphic form corresponding to the graphic. Based on the color value, coordinate value, and graphic form, the target graphic is generated in real time according to the rendering of the UI component; When the feature code in the source code data is edited by the code component, the UI component will control the UI component to render and generate the target graphics in real time according to the processor executing the edited code, while the screen will be detected in real time, including the recognition of screen frames. When rendering stutters are detected through frame rate, the second and third feature codes are detected, and fault description data of the second and third feature codes are output. Semantic recognition is performed on the fault description data, and the second and third feature codes are repaired based on the semantic recognition results. Then, the repaired code is re-executed based on the code component to ensure real-time generation of graphics.
2. A Unity-based graphics rendering system, characterized in that, The system, applied to the method of claim 1, comprises: The program acquisition module is used to acquire an XCharts development toolkit, which includes the XCharts main program. The project creation module is used to create a Unity project based on the XCharts main program using the Unity engine. The scene creation module is used to create a new drawing scene in the Unity project. The UI creation module is used to identify the drawing scene and create UI components based on the image source in the drawing scene; The code creation module is used to add code components to the property panel of the Unity project. The code editing module is used to load the code component and set the color values, coordinate values, and graphic form of the Unity project in the source code based on the code component; The graphics generation module is used to generate the target graphics in real time based on the color values, coordinate values, and graphic form of the UI component.
3. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of claim 1.
4. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the computer program, it implements the method of claim 1.
Citation Information
Patent Citations
Unity-based three-dimensional software development method and device, equipment and medium
CN115640044A
Large-space AR (Augmented Reality) identification method and system developed by combining WeChat applet with Unity
CN117667048A