CN115080016A - Extended function implementation method, device, equipment and medium based on UE editor - Google Patents

Extended function implementation method, device, equipment and medium based on UE editor Download PDF

Info

Publication number
CN115080016A
CN115080016A CN202210706067.1A CN202210706067A CN115080016A CN 115080016 A CN115080016 A CN 115080016A CN 202210706067 A CN202210706067 A CN 202210706067A CN 115080016 A CN115080016 A CN 115080016A
Authority
CN
China
Prior art keywords
target
function
configuration file
page
editor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210706067.1A
Other languages
Chinese (zh)
Inventor
黄炳超
高庆
宋大伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Qinyou Network Technology Co ltd
Original Assignee
Suzhou Qinyou Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Qinyou Network Technology Co ltd filed Critical Suzhou Qinyou Network Technology Co ltd
Priority to CN202210706067.1A priority Critical patent/CN115080016A/en
Publication of CN115080016A publication Critical patent/CN115080016A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for realizing extended functions based on a UE editor. The method comprises the following steps: responding to a trigger instruction of a target extended function in a UE editor, and acquiring a page configuration file corresponding to the target extended function; executing the page configuration file to generate a function display page matched with the target extended function; responding to a trigger operation of a target control in a function display page, and acquiring a target script matched with the trigger operation; and triggering and executing the control logic code in the target script to realize the target control function. By adopting the technical scheme, the extended function of the UE editor can be developed simply and efficiently at low cost on the basis of not changing the source code of the UE.

Description

Extended function implementation method, device, equipment and medium based on UE editor
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, equipment and a medium for realizing extended functions based on a UE editor.
Background
With the development of computer technology, more and more game software is available on the market. Currently, most game developers select UE (virtual Engine) as a game development platform. Developers can realize the production of various game animations by using the native functions provided by the UE editor. However, in consideration of the personalization of game development, the native function often cannot meet the actual functional requirements of developers, so the UE editor provides a channel for the developers to add the extended function, and the developers can add the personalized extended function to the UE editor.
Currently, the following method is mostly adopted to implement the function extension of the UE editor: c + + combined with Slate control is used in a plug-in mode, and a tool interface and logic are spliced; carrying out visualization tool expansion and logic compiling by using a built-in blueprint tool of an illusion engine such as Editor Utility Widgets and the like; splicing an extension tool interface by using an open source python plug-in and writing tool logic; and integrating a third-party human-computer interaction framework completely independent of the UE, and the like.
However, the existing various function extension methods have some defects, such as high learning cost, long compiling time, incapability of quickly iterating interfaces, or easiness in causing version conflict when multiple persons maintain.
Disclosure of Invention
The invention provides a method, a device, equipment and a medium for realizing an extended function based on a UE editor, which aims to provide a novel function extension mode of the UE editor and realize the extended function of the UE editor simply and efficiently at low cost.
According to an aspect of the present invention, there is provided a method for implementing extended functionality based on a UE editor, the method including:
responding to a trigger instruction of a target extended function in a UE editor, and acquiring a page configuration file corresponding to the target extended function;
executing the page configuration file to generate a function display page matched with the target extended function;
responding to a trigger operation of a target control in a function display page, and acquiring a target script matched with the trigger operation;
and triggering and executing the control logic code in the target script to realize the target control function.
Optionally, the page configuration file is a JSON configuration file set, the target control is a Slate control, and the target script is a python script.
Optionally, executing the page configuration file includes:
if the total number of the JSON configuration files included in the JSON configuration file set is greater than or equal to 2, identifying a main configuration file in the JSON configuration file set;
executing each configuration item in the main configuration file line by line to dynamically update the function display page;
when a key configuration field in the master configuration file is read, identifying a target slave configuration file matched with the key configuration field;
and skipping to execute each configuration item in the target slave configuration file in the JSON configuration file set, and after the execution is finished, returning to execute the operation of each configuration item in the main configuration file line by line until the execution of the main configuration file is finished.
Optionally, the obtaining of the target script matched with the trigger operation includes:
acquiring a target control event matched with the trigger operation;
inquiring the page configuration file, and acquiring a target python instruction matched with the target control event;
and acquiring the target script matched with the target python instruction according to the binding relationship between the python instruction and the python script.
Optionally, the method further includes:
and pre-establishing a binding relationship between the python instruction and the python script through a lambda function in the python function library.
Optionally, after triggering execution of the control logic code in the target script, the method further includes:
and responding to a calling request of a target control interface, executing the target control interface, and updating and displaying a control corresponding to the target control interface in the function display page.
Optionally, the method is executed by a function extension plug-in pre-installed in the UE editor;
the function extension plug-in is obtained by writing in C + + language; and the target extension function is developed by using the function extension plug-in.
According to another aspect of the present invention, there is provided an extended function implementation apparatus based on a UE editor, including:
the command response module is used for responding to a trigger command of a target extended function in the UE editor and acquiring a page configuration file corresponding to the target extended function;
the file execution module is used for executing the page configuration file and generating a function display page matched with the target extended function;
the operation response module is used for responding to the trigger operation of the target control in the function display page and acquiring a target script matched with the trigger operation;
and the code execution module is used for triggering and executing the control logic codes in the target script so as to realize the function of the target control.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the extended functionality implementation method based on the UE editor according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the extended function implementation method based on a UE editor according to any one of the embodiments of the present invention when the computer instructions are executed.
According to another aspect of the present invention, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the UE editor-based extended functionality implementation method according to any of the embodiments of the present invention.
The technical proposal of the embodiment of the invention defines the page configuration file and the script file corresponding to the same extended function in advance, and the manner in which the different controls in the page configuration file are associated with the scripts of the different control logic codes in the script file, a function presentation page may be presented based on the page profile when the extended function is triggered to execute, the technical scheme of the embodiment of the invention can realize that the extended function of the UE editor can be developed simply and efficiently at low cost on the basis of not changing the source code of the UE, thereby effectively reducing the compiling cost in the extended function development process and solving the problems of low blueprint information density, easy version conflict caused by multi-person maintenance and the like of the traditional method for extending the UE editor.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for implementing extended functionality based on a UE editor according to an embodiment of the present invention;
fig. 2a is a flowchart of a method for implementing extended functionality based on a UE editor according to a second embodiment of the present invention;
fig. 2b is a schematic diagram of an extended function implementation scenario of a specific UE editor to which the technical solution of the embodiment of the present invention is applied;
fig. 3 is a schematic structural diagram of an extended function apparatus based on a UE editor according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing an extended function implementation method based on a UE editor according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of the present invention and the above-described drawings, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, in order to facilitate understanding of the embodiments, the main inventive concept of the present invention is briefly described.
In the embodiment of the present invention, a developer is first required to develop an extended function based on the UE editor, that is, a personalized function different from a native function provided by the UE editor. After that, the developer can integrate the extended functions into the UE editor for the user of the UE editor to invoke.
For an extended function, a developer needs to develop a page configuration file and a script file which are matched with the extended function, wherein a page display form of the extended function, that is, a function display page corresponding to the extended function, is defined in the page configuration file. In the function page, one or more controls (e.g., a change-over control or a preview control, etc.) generally need to be exposed, and the controls also need to be defined in the page configuration file. When a control displayed in the function display page is triggered by a user, a corresponding control function needs to be implemented in the function display page. Based on this, developers need to write matched control logic codes in advance for each control and store the codes in the matched scripts, and then, when the controls are triggered, the corresponding scripts are executed, so that the functions of the controls can be simply and conveniently realized.
Considering that the UE editor already provides an interface for a developer to add an extended function, a function extension plug-in may be first developed by the developer to be added as a special extended function to the UE editor, and then the developer may write a page configuration file and a script file matching a desired extended function (e.g., a first extended function) by using the function extension plug-in, and add the first extended function to the UE editor as well. And then, when a user selects to trigger the first extended function in the UE editor, executing the first extended function in the UE editor by scheduling the function extension plug-in.
Example one
Fig. 1 is a flowchart of an extended function implementation method based on a UE editor according to an embodiment of the present invention, where this embodiment is applicable to a case where a user-defined extended function that does not belong to a native function is implemented in the UE editor, and the method may be implemented by an extended function implementation apparatus based on the UE editor, where the extended function implementation apparatus based on the UE editor may be implemented in a form of hardware and/or software, and may be generally integrated in a computer running the UE editor, and specifically, implemented by a function extension plug-in pre-installed in the UE editor. As shown in fig. 1, the method includes:
s110, responding to a trigger instruction of a target extended function in the UE editor, and acquiring a page configuration file corresponding to the target extended function.
The UE editor is an editing interface for realizing game animation development in the UE and can be used for interface development. In this embodiment, one or more extended functions that are not native functions are integrated in the UE editor in advance. The target extended function is one of the extended functions.
When a user clicks the trigger control corresponding to the target extended function in a single-click or double-click manner, a trigger instruction for the target extended function can be correspondingly triggered and generated.
Correspondingly, when the function extension plug-in obtains the trigger instruction, firstly, the page configuration file corresponding to the target extension function is obtained. In the page configuration file, the arrangement mode of each page element in the function display page matched with the target extended function is recorded.
For example, if the target expansion function is a function of reloading a virtual character, the reloading presentation page corresponding to the target expansion function generally needs to include: the virtual character display area, the clothing display area and the reloading preview area are arranged in the virtual character display area, the clothing display area and the reloading preview area, and meanwhile, the reloading control is required to be included. Correspondingly, in the page configuration file, the display positions and the display styles of the areas and the reloading control in the reloading display page need to be recorded.
And S120, executing the page configuration file and generating a function display page matched with the target extended function.
As described above, the page configuration file defines the arrangement of each page element in the function presentation page, and the function presentation page matched with the target extension function can be dynamically generated by dynamically executing the page configuration file using the function extension plug-in.
Accordingly, the page configuration file is an executable file implemented by setting a programming language, which may be JSON language, C + + language, python language, or the like, and this embodiment does not limit this.
S130, responding to the trigger operation of the target control in the function display page, and acquiring a target script matched with the trigger operation.
In order to implement an extended function through the function presentation page, one or more controls need to be presented in the function presentation page, and different controls implement different control functions. Considering that the extended function takes the UE editor as a carrier, the above-mentioned each control may be a Slate control.
The Slate is a fully custom, platform-independent user interface architecture designed to make building the user interface of tools and applications (typically, UE editors) or in-game user interfaces more interesting and efficient. It incorporates a declarative grammar that can easily design, layout, and style components, allowing easy user interface creation and iterative development.
And the target control is one of the controls displayed in the function display page. When the user touches the target control in a single-click or double-click mode, the trigger operation on the target control can be correspondingly triggered and generated.
As described above, when constructing the target extended function, it is necessary to construct control logic codes corresponding to each control in advance, and encapsulate the control logic codes in a matched script. Correspondingly, after the binding relationship between each control in the function display page and the matched script is pre-established in the function extension plug-in, the target script corresponding to the target control can be correspondingly obtained according to the identified target control in the dynamic display process of the function display page.
And S140, triggering and executing the control logic code in the target script to realize the function of the target control.
In this embodiment, by executing the control logic code in the target script in the function extension plug-in, the function corresponding to the target control can be realized. For example, from the perspective of the user, when the user clicks a change control in a change display page for implementing a virtual character change function, the user can see that the user selects a change dress to perform a change display on the body of the set virtual character.
The technical proposal of the embodiment of the invention defines the page configuration file and the script file corresponding to the same extended function in advance, and the manner in which the different controls in the page configuration file are associated with the scripts of the different control logic codes in the script file, a function presentation page may be presented based on the page profile when the extended function is triggered to execute, the technical scheme of the embodiment of the invention can realize that the extended function of the UE editor can be developed simply and efficiently at low cost on the basis of not changing the source code of the UE, thereby effectively reducing the compiling cost in the extended function development process and solving the problems of low blueprint information density, easy version conflict caused by multi-person maintenance and the like of the traditional method for extending the UE editor.
In an optional implementation manner of this embodiment, the page configuration file may be a JSON configuration file set, where the JSON configuration file set includes one or more JSON configuration files.
The advantages of such an arrangement are: when a developer selects a mode of configuring the JSON configuration file set to perform page configuration on the function display page, the function display page corresponding to the currently written page configuration file can be checked in real time in the process of performing page configuration, a large amount of C + + compiling and debugging time is saved, and the page development cost of the developer is greatly saved.
In an optional implementation manner of this embodiment, the target script may specifically be a python script.
The advantages of such an arrangement are: the UE originally supports python scripts, a blueprint interface is automatically exported, the data is rich, a rich third-party library is provided, the method can be developed under art engineering, and the method is conveniently combined with various DCC (Digital Content Creation) and process software without compiling.
Example two
Fig. 2a is a flowchart of a method for implementing an extended function based on a UE editor according to a second embodiment of the present invention, and this embodiment further embodies a process for implementing an extended function based on a UE editor based on the above-mentioned embodiment. As shown in fig. 2a, the method comprises:
s210, responding to a trigger instruction of a target extension function in the UE editor, and acquiring a JSON configuration file set corresponding to the target extension function.
S220, judging whether the total number of the JSON configuration files in the JSON configuration file set is larger than or equal to 2: if yes, go to S230; otherwise, S240 is performed.
Considering that when the tool layout of the function display page is relatively complex, if logic nesting is performed only in a single JSON configuration file, the JSON configuration file of a single rendering interface is too long, the nesting structure is complex, readability is reduced, and subsequent maintenance is not facilitated. Furthermore, a single JSON file can be split into a plurality of JSON files and stored in the JSON file set, and the master configuration file and the slave configuration files are divided, so that the structure of the single JSON file is clear, the content is simplified, and the readability and maintainability of the JSON file are greatly improved.
And S230, identifying a main configuration file in the JSON configuration file set, and executing S250.
S240, executing the unique JSON configuration file set in the JSON configuration file set, generating a function display page matched with the target extension function, and executing S280.
And S250, executing each configuration item in the main configuration file line by line so as to dynamically update the function display page.
Wherein, when the key configuration field in the main configuration file is read, executing S260, and when the complete execution of the main configuration file is completed, executing S280.
S260, when the key configuration fields in the main configuration file are read, identifying the target slave configuration file matched with the key configuration fields, and executing S270.
S270, jumping to execute each configuration item in the target slave configuration file in the JSON configuration file set, and returning to execute S250 after the execution is finished.
In the function presentation page, in order to present a plurality of page elements at the same time, page elements corresponding to different functions may be presented in regions. Correspondingly, the master configuration file may be a global page configuration file corresponding to the whole function presentation page, and the slave configuration file may be a local page configuration file corresponding to each function presentation area in the function presentation page.
For example, the change page may include a virtual character display area, a clothing display area, a change preview area, and the like, in which case the main profile may be a profile of the entire change page, and the slave profiles may be profiles corresponding to the virtual character display area, the clothing display area, and the change preview area, respectively.
Based on the above embodiment, the key configuration field may be the name of the slave configuration file contained in the master configuration file. When the name of the slave configuration file is read from the master configuration file, each configuration item in the slave configuration file needs to be skipped to execute.
For example, in the process of reading each configuration item in the master configuration file corresponding to the change page and dynamically rendering and displaying the change page, when the file name of the slave configuration file (for example, the first slave configuration file) matching with the clothing display area is read, the reading operation of each configuration item in the first slave configuration file is started to dynamically render and display the clothing display area.
And S280, responding to the trigger operation of the target control in the function display page, and acquiring a target script matched with the trigger operation.
Optionally, the target script is specifically a python script. Correspondingly, in an optional implementation manner of this embodiment, the obtaining of the target script matched with the trigger operation may include:
acquiring a target control event matched with the trigger operation; inquiring the page configuration file, and acquiring a target python instruction matched with the target control event; and acquiring the target script matched with the target python instruction according to the binding relationship between the python instruction and the python script.
In the present embodiment, the control event may be understood as an operation type of a control operation performed on the setting control, for example, a single click, a double click, a long press, or a drag. It can be understood that, after the user selects to execute the corresponding control operation on a specific target control in the function presentation page, a matched target control event can be generated based on the control operation.
Specifically, the target control event includes a control identifier matched with the target control and an operation type corresponding to the target control. For example, a single click operation performed on the first Slate control.
In this embodiment, mapping relationships between different control events and different python instructions are established in a page configuration file in advance, and since a binding relationship is established between a python instruction and a python script in advance, one python instruction can uniquely identify one python script. Because each python script records a control logic code for realizing the setting of the control function, after the control event is determined, the control logic code to be executed aiming at the control event is uniquely determined.
The binding relationship between the python instruction and the python script can be pre-established in the function extension plug-in. Optionally, the function extension plug-in may pre-establish a binding relationship between the python instruction and the python script through a lambda function in the python function library.
And S290, triggering and executing the control logic code in the target script to realize the function of the target control.
S2100, responding to a calling request of a target control interface, executing the target control interface, and updating and displaying a control corresponding to the target control interface in the function display page.
In this embodiment, it is further considered that different controls in the function presentation page may have a certain linkage relationship. For example, in the reloading display page, there are a reloading control and a reloading times counting control. Therefore, after the user touches the reloading control once, the reloading counting number value corresponding to the reloading counting number control needs to be correspondingly added with one. Furthermore, when the reloading control is triggered, the reloading frequency counting control needs to be linked with the reloading frequency counting control.
Therefore, each control or the control interface of the control which needs to be linked with other controls can be exposed to the outside in advance, and then when developers write the control logic code corresponding to each control respectively, the technical effect that after the triggering execution of one control, one or more other controls can be linked with the control can be achieved by calling the control interfaces exposed to the outside through other controls.
According to the technical scheme of the embodiment of the invention, the mode of executing each configuration item in the main configuration file firstly when the JSON configuration file set is executed and skipping to execute each configuration item of the corresponding slave configuration file when the key field is identified enables the nested structure of the JSON configuration file set to be simple and clear, improves the readability of the JSON configuration file set, simultaneously can develop the extended function of the UE editor simply and efficiently at low cost on the basis of not changing the source code of the UE, effectively reduces the compiling cost in the extended function development process, and solves the problems of low blueprint information density, version conflict easily caused by multi-person maintenance and the like of the traditional method for extending the UE editor
Application specific scenarios
Fig. 2b is a schematic diagram illustrating an extended function implementation scenario of a specific UE editor to which the technical solution of the embodiment of the present invention is applied. As shown in fig. 2b, in this specific application scenario, the FTPython is a plug-in capable of generating an extended function, and is installed in the UE editor in advance. Similarly, after each extended function generated by the FTPython, each extended function is also installed in the UE editor. JSON is a JSON page configuration file set, Python is a Python script bound with a Python command, and Slate is a Slate control.
When a trigger control of a target extended function in a UE editor is selected, FTPython reads a JSON configuration file set corresponding to the target extended function, dynamically renders a function display page, and dynamically creates a Slate control and a splicing tool interface in the function display page.
The FTPython binds the Python command with the Python script through lambda, and the FTPython exposes the Slate control interface to the Python through BlueprintCalable.
In order to obtain an extended function based on a UE editor, firstly, an FTPython plug-in is called, a JSON page configuration file set corresponding to a target extended function is obtained through the FTPython plug-in, and a function display page matched with the target extended function can be generated by reading the JSON page configuration file set.
Specifically, when reading the JSON configuration file set, firstly, judging whether the total number of the JSON configuration files in the configuration file set is greater than or equal to 2, if so, directly executing the unique JSON configuration file set in the JSON configuration file set, and generating a function display page matched with the target extended function; if the total number of the JSON files is greater than or equal to 2, executing all the configuration items in the main configuration file line by line to dynamically update the function display page, identifying a target slave configuration file matched with a key configuration field when the key configuration field in the main configuration file is read, skipping and executing all the configuration items in the target slave configuration files in the JSON configuration file set, and continuing to execute all the configuration items in the main configuration file after the execution is finished until all the loading of the function display page is finished.
Further, by executing the set of JSON configuration files, a Slate control can be dynamically created on the function presentation page. And a python command corresponding to the Slate control is configured in the JSON configuration file set. When a user needs to realize the function of the target control, the Slate control corresponding to the function of the target control can be clicked.
Correspondingly, when the FTPython detects that the Slate control is clicked (namely, a target control event), a target Python instruction matched with the target control event is inquired in the JSON configuration file set, and then a binding relationship between the preset Python instruction and the Python script is inquired, and then the corresponding Python script stored in the Python is called, and then the control logic code in the Python script is executed, so that the technical effect of updating the function display page according to the function of the Slate control can be achieved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an extended function implementation apparatus based on a UE editor according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: an instruction response module 310, a file execution module 320, and an operation response module 330, wherein:
the instruction response module 310 is configured to, in response to a trigger instruction for a target extended function in the UE editor, obtain a page configuration file corresponding to the target extended function.
And a file executing module 320, configured to execute the page configuration file, and generate a function display page matched with the target extended function.
The operation response module 330 is configured to, in response to a trigger operation on a target control in the function display page, obtain a target script matched with the trigger operation.
And the code execution module 340 is configured to trigger execution of the control logic code in the target script to implement the target control function.
The technical proposal of the embodiment of the invention defines the page configuration file and the script file corresponding to the same extended function in advance, and the manner in which the different controls in the page configuration file are associated with the scripts of the different control logic codes in the script file, a function presentation page may be presented based on the page profile when the extended function is triggered to execute, the technical scheme of the embodiment of the invention can realize that the extended function of the UE editor can be developed simply and efficiently at low cost on the basis of not changing the source code of the UE, thereby effectively reducing the compiling cost in the extended function development process and solving the problems of low blueprint information density, easy version conflict caused by multi-person maintenance and the like of the traditional method for extending the UE editor.
On the basis of the above embodiments, the page configuration file may be a JSON configuration file set; the target control may be a slit control; the target script may be a python script.
On the basis of the foregoing embodiments, the file executing module 320 may be specifically configured to:
if the total number of the JSON configuration files included in the JSON configuration file set is greater than or equal to 2, identifying a main configuration file in the JSON configuration file set;
executing each configuration item in the main configuration file line by line to dynamically update the function display page;
when a key configuration field in the master configuration file is read, identifying a target slave configuration file matched with the key configuration field;
and skipping to execute each configuration item in the target slave configuration file in the JSON configuration file set, and after the execution is finished, returning to execute the operation of executing each configuration item in the main configuration file line by line until the execution of the main configuration file is finished.
On the basis of the foregoing embodiments, the operation response module 330 may be specifically configured to:
acquiring a target control event matched with the trigger operation;
inquiring the page configuration file, and acquiring a target python instruction matched with the target control event;
and acquiring the target script matched with the target python instruction according to the binding relationship between the python instruction and the python script.
On the basis of the above embodiments, the method may further include:
and the binding relationship establishing module is used for establishing the binding relationship between the python instruction and the python script in advance through the lambda function in the python function library.
On the basis of the above embodiments, the method may further include:
and the control interface calling module is used for responding to a calling request of a target control interface after triggering and executing the control logic code in the target script and executing the target control interface so as to update and display the control corresponding to the target control interface in the function display page.
On the basis of the above embodiments, the device is configured on a function extension plug-in pre-installed in the UE editor;
the function extension plug-in is obtained by writing in C + + language; and the target extension function is developed by using the function extension plug-in.
The extended function implementation device based on the UE editor provided by the embodiment of the invention can execute the extended function implementation method based on the UE editor provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
FIG. 4 shows a schematic block diagram of an electronic device 40 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 40 includes at least one processor 41, and a memory communicatively connected to the at least one processor 41, such as a Read Only Memory (ROM)42, a Random Access Memory (RAM)43, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 41 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)42 or the computer program loaded from the storage unit 48 into the Random Access Memory (RAM) 43. In the RAM 43, various programs and data necessary for the operation of the electronic apparatus 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other via a bus 44. An input/output (I/O) interface 45 is also connected to the bus 44.
A number of components in the electronic device 40 are connected to the I/O interface 45, including: an input unit 46 such as a keyboard, a mouse, etc.; an output unit 47 such as various types of displays, speakers, and the like; a storage unit 48 such as a magnetic disk, an optical disk, or the like; and a communication unit 49 such as a network card, modem wireless communication transceiver, or the like. The communication unit 49 allows the electronic device 40 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Processor 41 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The processor 41 performs the various methods and processes described above, such as the extended functionality implementation method based on the UE editor. Namely:
responding to a trigger instruction of a target extended function in a UE editor, and acquiring a page configuration file corresponding to the target extended function;
executing the page configuration file to generate a function display page matched with the target extended function;
responding to a trigger operation of a target control in a function display page, and acquiring a target script matched with the trigger operation;
and triggering and executing the control logic code in the target script to realize the target control function.
In some embodiments, the UE editor-based extended functionality implementation method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 40 via the ROM 42 and/or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the UE editor based extended functionality implementation method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured by any other suitable means (e.g., by means of firmware) to perform the UE editor-based extended function implementation method.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An extended function implementation method based on a ghost engine UE editor is characterized by comprising the following steps:
responding to a trigger instruction of a target extended function in a UE editor, and acquiring a page configuration file corresponding to the target extended function;
executing the page configuration file to generate a function display page matched with the target extended function;
responding to a trigger operation of a target control in a function display page, and acquiring a target script matched with the trigger operation;
and triggering and executing the control logic code in the target script to realize the target control function.
2. The method of claim 1, wherein the page configuration file is a set of JSON configuration files, the target control is a Slate control, and the target script is a python script.
3. The method of claim 2, wherein executing the page profile comprises:
if the total number of the JSON configuration files included in the JSON configuration file set is greater than or equal to 2, identifying a main configuration file in the JSON configuration file set;
executing each configuration item in the main configuration file line by line to dynamically update the function display page;
when a key configuration field in the master configuration file is read, identifying a target slave configuration file matched with the key configuration field;
and skipping to execute each configuration item in the target slave configuration file in the JSON configuration file set, and after the execution is finished, returning to execute the operation of each configuration item in the main configuration file line by line until the execution of the main configuration file is finished.
4. The method of claim 2, wherein obtaining a target script that matches the trigger operation comprises:
acquiring a target control event matched with the trigger operation;
inquiring the page configuration file, and acquiring a target python instruction matched with the target control event;
and acquiring the target script matched with the target python instruction according to the binding relationship between the python instruction and the python script.
5. The method of claim 4, further comprising:
and pre-establishing a binding relationship between the python instruction and the python script through a lambda function in the python function library.
6. The method of claim 1, after triggering execution of control logic code in the target script, further comprising:
and responding to a calling request of a target control interface, executing the target control interface, and updating and displaying a control corresponding to the target control interface in the function display page.
7. The method according to any of claims 1-6, wherein the method is performed by a function extension plug-in pre-installed in the UE editor;
the function extension plug-in is obtained by writing in C + + language; and the target extension function is developed by using the function extension plug-in.
8. An extended function implementation apparatus based on a ghost engine UE editor, comprising:
the command response module is used for responding to a trigger command of a target extended function in the UE editor and acquiring a page configuration file corresponding to the target extended function;
the file execution module is used for executing the page configuration file and generating a function display page matched with the target extended function;
the operation response module is used for responding to the trigger operation of the target control in the function display page and acquiring a target script matched with the trigger operation;
and the code execution module is used for triggering and executing the control logic codes in the target script so as to realize the function of the target control.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the ghost engine UE editor based extended functionality implementation method of any one of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to implement the ghost engine UE editor based extended functionality implementation method of any one of claims 1-7 when executed.
CN202210706067.1A 2022-06-21 2022-06-21 Extended function implementation method, device, equipment and medium based on UE editor Pending CN115080016A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210706067.1A CN115080016A (en) 2022-06-21 2022-06-21 Extended function implementation method, device, equipment and medium based on UE editor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210706067.1A CN115080016A (en) 2022-06-21 2022-06-21 Extended function implementation method, device, equipment and medium based on UE editor

Publications (1)

Publication Number Publication Date
CN115080016A true CN115080016A (en) 2022-09-20

Family

ID=83253942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210706067.1A Pending CN115080016A (en) 2022-06-21 2022-06-21 Extended function implementation method, device, equipment and medium based on UE editor

Country Status (1)

Country Link
CN (1) CN115080016A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116048482A (en) * 2023-01-17 2023-05-02 成都曾自科技有限公司 API-based automatic editor function expansion method, device and storage medium
CN116382681A (en) * 2023-02-16 2023-07-04 成都曾自科技有限公司 Method, device, equipment and storage medium for developing virtual engine layout

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116048482A (en) * 2023-01-17 2023-05-02 成都曾自科技有限公司 API-based automatic editor function expansion method, device and storage medium
CN116048482B (en) * 2023-01-17 2023-09-19 成都曾自科技有限公司 API-based automatic editor function expansion method, device and storage medium
CN116382681A (en) * 2023-02-16 2023-07-04 成都曾自科技有限公司 Method, device, equipment and storage medium for developing virtual engine layout
CN116382681B (en) * 2023-02-16 2023-11-10 成都曾自科技有限公司 Method, device, equipment and storage medium for developing virtual engine layout

Similar Documents

Publication Publication Date Title
TWI808393B (en) Page processing method, device, apparatus and storage medium
CN113268226B (en) Page data generation method, device, storage medium and equipment
EP3304286B1 (en) Data binding dependency analysis
CN111522552B (en) Sub-application generation method and device, computer equipment and storage medium
US10592211B2 (en) Generation of application behaviors
CN115080016A (en) Extended function implementation method, device, equipment and medium based on UE editor
CN111177621B (en) Web page development method, device and system
CN110275704A (en) Page data processing method and device, storage medium and electronic equipment
CN111782181A (en) Code generation method and device, electronic equipment and storage medium
CN113282214A (en) Stroke rendering method, device, storage medium and terminal
US10289388B2 (en) Process visualization toolkit
CN112148276A (en) Visual programming for deep learning
CN114185874A (en) Big data based modeling method and device, development framework and equipment
CN114186527A (en) Method and device for realizing automatic wiring of integrated circuit independent of grid point
CN112068879B (en) Method and device for constructing client application program development framework based on configuration
CN112328225A (en) Page operation method and operation system thereof
CN117234582A (en) Project code processing method and device, electronic equipment and storage medium
CN111857690A (en) Animation effect debugging method and device, computer equipment and storage medium
US20200073919A1 (en) Virtual agent creation platform
CN114741294A (en) Page debugging method, device, equipment and storage medium
US20140282477A1 (en) Automatic updating of data in application programs
CN114489619A (en) Interface view display method, terminal equipment and computer readable storage medium
CN111240676A (en) Method and device for generating code of skeleton screen
CN113342413B (en) Method, apparatus, device, medium, and article for processing components
CN116578372A (en) Editing method, device, equipment and storage medium for large data screen

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination