Method, device, equipment and medium for implementing extended functions based on UE editor
By pre-defined the page configuration file and script file of the UE editor, dynamically generate function display pages and implement control functions, solving the problems of high learning cost, long compilation time and version conflicts in the existing UE editor function expansion methods, and achieving low-cost and efficient function expansion.
Patent Information
- Application Number
- CN202210706067.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-06-21
AI Technical Summary
The existing UE editor function extension methods have problems such as high learning cost, long compilation time, inability to iterate the interface quickly, and the easy version conflicts caused by multiple people's maintenance.
By pre-defined page configuration files and script files corresponding to the extension function, and associated different controls in the page configuration file with scripts of different control logic codes in the script file, dynamic generation of function display pages and implementation of control functions.
Without changing the UE source code, the extension functions of the UE editor are developed at a low cost, simple and efficient manner, which reduces the compilation cost and solves the problems of low blueprint information density and easy version conflicts caused by multiple maintenance.
Smart Images

Figure CN115080016B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for implementing extended functions based on a UE editor. Background Art
[0002] With the development of computer technology, more and more game software has appeared on the market. At present, most game developers choose UE (Unreal 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, considering the personalization of game development, the native functions often cannot meet the actual functional requirements of developers. Therefore, the UE editor provides developers with a channel to add extended functions, and developers can add personalized extended functions to the UE editor.
[0003] At present, the following methods are mostly used to implement functional expansion of the UE editor: using C++ combined with Slate controls in the form of plug-ins to splice tool interfaces and logic; using Unreal Engine built-in blueprint tools such as Editor Utility Widgets to expand visual tools and write logic; using open source python plug-ins to splice and expand tool interfaces and write tool logic; and integrating third-party human-computer interaction frameworks that are completely independent of UE.
[0004] However, the existing various function expansion methods have some defects to a greater or lesser extent, such as high learning cost, long compilation time, inability to quickly iterate the interface, or easy version conflicts when maintained by multiple people. Summary of the invention
[0005] The present invention provides a method, device, equipment and medium for realizing extended functions based on a UE editor, so as to provide a new function extension mode of the UE editor, and realize the extended functions of the UE editor in a low-cost, simple and efficient manner.
[0006] According to one aspect of the present invention, a method for implementing an extended function based on a UE editor is provided, the method comprising:
[0007] In response to a trigger instruction for a target extended function in a UE editor, obtaining a page configuration file corresponding to the target extended function;
[0008] Executing the page configuration file to generate a function display page matching the target extended function;
[0009] In response to a trigger operation on a target control in a function display page, obtaining a target script matching the trigger operation;
[0010] Trigger the execution of the control logic code in the target script to implement the target control function.
[0011] 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.
[0012] Optionally, executing the page configuration file includes:
[0013] If the total number of 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;
[0014] Execute each configuration item in the main configuration file line by line to dynamically update the function display page;
[0015] When reading the key configuration field in the master configuration file, identifying the target slave configuration file that matches the key configuration field;
[0016] Jump to execute each configuration item in the target slave configuration file in the JSON configuration file set, and after the execution is completed, return 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 completed.
[0017] Optionally, obtaining a target script matching the trigger operation includes:
[0018] Obtain a target control event that matches the trigger operation;
[0019] Query the page configuration file to obtain the target Python instruction that matches the target control event;
[0020] According to the binding relationship between the Python instruction and the Python script, the target script matching the target Python instruction is obtained.
[0021] Optionally, also include:
[0022] A binding relationship between the python instruction and the python script is established in advance through the lambda function in the python function library.
[0023] Optionally, after triggering the execution of the control logic code in the target script, the method further includes:
[0024] In response to a call request to a target control interface, the target control interface is executed to update and display a control corresponding to the target control interface in the function display page.
[0025] Optionally, the method is performed by a function extension plug-in pre-installed in the UE editor;
[0026] The function extension plug-in is written in C++ language; and the target extension function is developed using the function extension plug-in.
[0027] According to another aspect of the present invention, there is provided a device for implementing an extended function based on a UE editor, comprising:
[0028] An instruction response module, configured to obtain a page configuration file corresponding to the target extended function in response to a trigger instruction for the target extended function in the UE editor;
[0029] A file execution module, used to execute the page configuration file and generate a function display page matching the target extended function;
[0030] An operation response module, used to respond to a trigger operation on a target control in a function display page and obtain a target script matching the trigger operation;
[0031] The code execution module is used to trigger the execution of the control logic code in the target script to realize the function of the target control.
[0032] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0033] at least one processor; and
[0034] a memory communicatively connected to the at least one processor; wherein,
[0035] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for implementing extended functions based on the UE editor as described in any embodiment of the present invention.
[0036] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for implementing extended functions based on a UE editor as described in any embodiment of the present invention when executed.
[0037] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method for realizing extended functions based on a UE editor according to any embodiment of the present invention is implemented.
[0038] The technical solution of the embodiment of the present invention predefines a page configuration file and a script file corresponding to the same extended function, and associates different controls in the page configuration file with scripts of different control logic codes in the script file. When the extended function is triggered to execute, the function display page can be displayed based on the page configuration file, and the control functions of different controls in the page configuration file can be realized based on different control logic codes defined in different scripts. The technical solution of the embodiment of the present invention can realize the low-cost, simple and efficient development of the extended function of the UE editor without changing the UE source code, effectively reducing the compilation cost in the extended function development process, and solving the problems of low blueprint information density and version conflicts easily caused by multi-person maintenance in the traditional extended UE editor method.
[0039] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0041] Figure 1 is a flowchart of a method for implementing an extended function based on a UE editor according to Embodiment 1 of the present invention;
[0042] Figure 2a is a flowchart of a method for implementing extended functions based on a UE editor according to Embodiment 2 of the present invention;
[0043] Figure 2b It is a schematic diagram of a specific UE editor extended function implementation scenario applicable to the technical solution of an embodiment of the present invention;
[0044] Figure 3 It is a structural diagram of a UE editor-based extended function device provided according to Embodiment 3 of the present invention;
[0045] Figure 4 It is a schematic diagram of the structure of an electronic device for implementing the method for implementing extended functions based on a UE editor according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0047] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatus.
[0048] First, in order to facilitate the understanding of each embodiment, the main inventive concept of the present invention is briefly described first.
[0049] In the embodiment of the present invention, developers first need to develop extended functions based on the UE editor, that is, personalized functions that are different from the native functions provided by the UE editor. Afterwards, the developers can integrate the extended functions into the UE editor for users of the UE editor to call and use.
[0050] For an extended function, developers need to develop a page configuration file and a script file that matches the extended function, wherein the page configuration file defines a page display form of an extended function, that is, a function display page corresponding to the extended function. In the function page, one or more controls (for example, a dress-up control or a preview control, etc.) generally need to be displayed, and the above controls also need to be defined in the page configuration file. When a control displayed in the function display page is triggered by the user, the corresponding control function needs to be implemented in the function display page. Based on this, developers need to pre-write matching control logic code for each control and store it in a matching script. Then, by executing the corresponding script when the control is triggered, the control function can be simply and conveniently implemented.
[0051] Considering that the UE editor has provided developers with an interface for adding extended functions, the developer can first develop a functional extension plug-in as a special extended function and add it to the UE editor. After that, the developer uses the functional extension plug-in to write a page configuration file and a script file that matches the required extended function (for example, the first extended function), and also adds the first extended function to the UE editor. After that, when a user chooses to trigger the first extended function in the UE editor, the first extended function is executed in the UE editor through the scheduling of the functional extension plug-in.
[0052] Embodiment 1
[0053] Figure 1 This is a flowchart of a method for implementing an extended function based on a UE editor provided in the first embodiment of the present invention. This embodiment is applicable to the case where a customized extended function that does not belong to a native function is implemented in a UE editor. The method can be executed by an extended function implementation device based on a UE editor. The extended function implementation device based on a UE editor can be implemented in the form of hardware and / or software, and can generally be integrated in a computer running a UE editor. Specifically, it is executed by a function extension plug-in pre-installed in the UE editor. Figure 1 As shown, the method includes:
[0054] S110 . In response to a trigger instruction for a target extended function in a UE editor, obtain a page configuration file corresponding to the target extended function.
[0055] The UE editor is an editing interface for implementing 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 pre-integrated in the UE editor. The target extended function is one of the above extended functions.
[0056] Among them, when an extended function is integrated into the UE editor, a trigger control matching the extended function can be added to the UE editor accordingly. When the user touches the trigger control corresponding to the target extended function by single-clicking or double-clicking, a trigger instruction for the target extended function can be generated accordingly.
[0057] Correspondingly, when the function extension plug-in obtains the trigger instruction, it first obtains the page configuration file corresponding to the target extended function. In the page configuration file, the arrangement of each page element in the function display page matching the target extended function is recorded.
[0058] For example, if the target extended function is to change the clothes of a virtual character, the dress-up display page corresponding to the target extended function generally needs to include: a virtual character display area, a clothing display area, and a dress-up preview area, and also needs to include a dress-up control. Accordingly, in the page configuration file, the display positions and display styles of the above-mentioned areas and the dress-up control in the dress-up display page need to be recorded.
[0059] S120: Execute the page configuration file to generate a function display page matching the target extended function.
[0060] As mentioned above, the page configuration file defines the arrangement of each page element in the function display page. By dynamically executing the page configuration file using the function extension plug-in, a function display page matching the target extended function can be dynamically generated.
[0061] Correspondingly, the page configuration file is an executable file implemented by setting a programming language, and the programming language can be JSON language, C++ language or Python language, etc., which is not limited in this embodiment.
[0062] S130: In response to a trigger operation on a target control in a function display page, a target script matching the trigger operation is obtained.
[0063] In order to realize the extended function through the function display page, one or more controls need to be displayed in the function display page, and different controls realize different control functions. In particular, considering that the extended function uses the UE editor as a carrier, the above controls can be Slate controls.
[0064] Slate is a completely custom, platform-independent user interface architecture designed to make the user interface of building tools and applications (typically, UE editor) or user interface in games more interesting and efficient. It combines a declarative syntax that can easily design, layout and style components, making it easy to create user interfaces and iteratively develop.
[0065] The target control is one of the controls displayed in the function display page. When the user touches the target control by single-clicking or double-clicking, a trigger operation on the target control can be generated accordingly.
[0066] As mentioned above, when building the target extension function, it is necessary to pre-build the control logic code corresponding to each control and encapsulate it in a matching script. Accordingly, after pre-establishing the binding relationship between each control in the function display page and the matching script in the function extension plug-in, the target script corresponding to the target control can be obtained according to the identified target control during the dynamic display of the function display page.
[0067] S140, triggering the execution of the control logic code in the target script to implement the target control function.
[0068] In this embodiment, the function corresponding to the target control can be realized by executing the control logic code in the target script in the function extension plug-in. For example, from the user's perspective, when the user clicks the dress-up control in the dress-up display page for realizing the virtual character dress-up function, the user can see the dress-up clothes selected by the user are displayed on the set virtual character.
[0069] The technical solution of the embodiment of the present invention predefines a page configuration file and a script file corresponding to the same extended function, and associates different controls in the page configuration file with scripts of different control logic codes in the script file. When the extended function is triggered to execute, the function display page can be displayed based on the page configuration file, and the control functions of different controls in the page configuration file can be realized based on different control logic codes defined in different scripts. The technical solution of the embodiment of the present invention can realize the low-cost, simple and efficient development of the extended function of the UE editor without changing the UE source code, effectively reducing the compilation cost in the extended function development process, and solving the problems of low blueprint information density and version conflicts easily caused by multi-person maintenance in the traditional extended UE editor method.
[0070] In an optional implementation of this embodiment, the page configuration file may be a JSON configuration file set, and the JSON configuration file set includes one or more JSON configuration files.
[0071] The advantage of this setting is that when developers choose to use the method of configuring JSON configuration file sets to configure the function display page, they can view the function display page corresponding to the currently written page configuration file in real time during the page configuration process, saving a lot of C++ compilation and debugging time, and greatly saving developers' page development costs.
[0072] In an optional implementation of this embodiment, the target script may specifically be a python script.
[0073] The advantages of this setting are: UE natively supports Python scripts, blueprint interfaces are automatically exported, there is rich information, there are abundant third-party libraries, it can be developed under art engineering, and it is convenient to combine with various DCC (Digital Content Creation) and process software without compilation.
[0074] Embodiment 2
[0075] Figure 2a This is a flow chart of a method for implementing an extended function based on a UE editor provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment further specifies the process of implementing an extended function based on a UE editor. Figure 2a As shown, the method includes:
[0076] S210: In response to a trigger instruction for a target extended function in a UE editor, obtain a JSON configuration file set corresponding to the target extended function.
[0077] S220. Determine whether the total number of JSON configuration files included in the JSON configuration file set is greater than or equal to 2: if so, execute S230; otherwise, execute S240.
[0078] Considering that when the tool layout of the function display page is relatively complex, if only logical nesting is performed in a single JSON configuration file, the single JSON configuration file describing the interface will be too long, and the nesting structure will be complex, which will reduce readability and be inconvenient for subsequent maintenance. In addition, a single JSON file can be split into multiple JSON files and stored in a JSON file set, and the main configuration file and the slave configuration file can be divided, which can effectively make the structure of a single JSON file clear and the content concise, greatly improving the readability and maintainability of the JSON file.
[0079] S230. In the JSON configuration file set, identify a main configuration file, and execute S250.
[0080] S240 , executing a unique JSON configuration file set in the JSON configuration file set, generating a function display page matching the target extended function, and executing S280 .
[0081] S250: Execute each configuration item in the main configuration file line by line to dynamically update the function display page.
[0082] When the key configuration fields in the main configuration file are read, S260 is executed, and when the main configuration file is completely executed, S280 is executed.
[0083] S260. When reading the key configuration field in the master configuration file, identify the target slave configuration file that matches the key configuration field, and execute S270.
[0084] S270, jump to execute each configuration item in the target slave configuration file in the JSON configuration file set, and after the execution is completed, return to execute S250.
[0085] In the function display page, in order to display multiple page elements at the same time, page elements corresponding to different functions may be displayed in different areas. Accordingly, the main configuration file may be a global page configuration file corresponding to the entire function display page, and the sub-configuration file may be a local page configuration file corresponding to each function display area in the function display page.
[0086] For example, a dressing page may include a virtual character display area, a clothing display area, and a dressing preview area. In this case, the main configuration file may be the configuration file for the entire dressing page, and the slave configuration file may be the configuration files corresponding to the virtual character display area, the clothing display area, and the dressing preview area, respectively.
[0087] Based on the above embodiment, the key configuration field may be the name of the slave configuration file included in the main configuration file. When the name of the slave configuration file is read from the main configuration file, it is necessary to jump to execute each configuration item in the slave configuration file.
[0088] For example, when reading the configuration items in the main configuration file corresponding to the dressing page and dynamically rendering and displaying the dressing page, when the file name of the slave configuration file (for example, it can be the first slave configuration file) that matches the clothing display area is read, the reading operation of the configuration items in the first slave configuration file is started to dynamically render and display the clothing display area.
[0089] S280: In response to a trigger operation on a target control in a function display page, a target script matching the trigger operation is obtained.
[0090] Optionally, the target script is specifically a python script. Accordingly, in an optional implementation of this embodiment, obtaining the target script that matches the trigger operation may include:
[0091] Obtain a target control event that matches the trigger operation; query the page configuration file to obtain a target Python instruction that matches the target control event; and obtain the target script that matches the target Python instruction based on a binding relationship between a Python instruction and a Python script.
[0092] In this embodiment, the control event can be understood as the operation type of the control operation performed on the set control, such as single click, double click, long press or drag, etc. It can be understood that when the user chooses to perform a corresponding control operation on a specific target control in the function display page, a matching target control event can be generated based on the control operation.
[0093] Specifically, the target control event includes a control identifier that matches the target control and an operation type corresponding to the target control, for example, a click operation performed on the first Slate control.
[0094] In this embodiment, a mapping relationship between different control events and different python instructions is established in advance in the page configuration file. Since a binding relationship is established in advance between the python instruction and the python script, a python instruction can uniquely identify a python script. Since each python script records a control logic code for implementing the set control function, when the control event is determined, the control logic code to be executed for the control event is also uniquely determined.
[0095] 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 can pre-establish the binding relationship between the python instruction and the python script through a lambda function in a python function library.
[0096] S290, triggering the execution of the control logic code in the target script to implement the target control function.
[0097] S2100. In response to a call request to a target control interface, execute the target control interface to update and display a control corresponding to the target control interface in the function display page.
[0098] In this embodiment, it is further considered that different controls in the function display page may have a certain linkage relationship. For example, in the dress-up display page, there is a dress-up control and a dress-up count control. Therefore, every time the user touches the dress-up control, the dress-up count value corresponding to the dress-up count control needs to be increased by one accordingly. Furthermore, when the dress-up control is triggered, the dress-up count control needs to be linked with it.
[0099] Therefore, the control interface of each control, or the control that needs to be linked with other controls, can be exposed in advance. Then, when the developer writes the control logic code corresponding to each control, the control interface exposed by other controls can be called to achieve the technical effect that after one control is triggered and executed, one or more other controls can be linked with it.
[0100] The technical solution of the embodiment of the present invention makes the nested structure of the JSON configuration file set simple and clear by first executing each configuration item in the main configuration file when the JSON configuration file set is executed, and jumps to execute each configuration item of the corresponding slave configuration file when the key field is identified, thereby improving the readability of the JSON configuration file set. At the same time, it can realize the low-cost, simple and efficient development of the extended function of the UE editor without changing the UE source code, effectively reducing the compilation cost in the process of extending the function, and solving the problems of low blueprint information density and version conflicts caused by multi-person maintenance in the traditional method of extending the UE editor.
[0101] Specific application scenarios
[0102] exist Figure 2b A schematic diagram of a specific UE editor extended function implementation scenario applicable to the technical solution of an embodiment of the present invention is shown in FIG. Figure 2b As shown, in this specific application scenario, FTPython is a plug-in that can generate extended functions and is pre-installed in the UE editor. Similarly, after each extended function is generated by 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 to the python command, and Slate is a Slate control.
[0103] Among them, when the trigger control of the target extended function in the UE editor is selected, FTPython reads the JSON configuration file set corresponding to the target extended function, dynamically renders the function display page, and dynamically creates a Slate control in the function display page to splice the tool interface.
[0104] Among them, FTPython binds the python command to the python script through lambda, and FTPython exposes the Slate control interface to Python through BlueprintCallable.
[0105] To obtain the extended function based on the UE editor, first call the FTPython plug-in, and obtain the JSON page configuration file set corresponding to the target extended function through the FTPython plug-in. By reading the JSON page configuration file set, a function display page matching the target extended function can be generated.
[0106] Specifically, when reading a JSON configuration file set, first determine whether the total number of JSON configuration files in the configuration file set is greater than or equal to 2. If the total number of JSON files is less than 2, directly execute the only JSON configuration file set in the JSON configuration file set to generate a function display page that matches the target extended function; if the total number of JSON files is greater than or equal to 2, execute each configuration item in the main configuration file line by line to dynamically update the function display page. When reading a key configuration field in the main configuration file, identify a target slave configuration file that matches the key configuration field, jump to execute each configuration item in the target slave configuration file in the JSON configuration file set, and continue to execute each configuration item in the main configuration file after execution is completed until all the function display pages are loaded.
[0107] Furthermore, by executing the JSON configuration file set, a Slate control can be dynamically created on the function display page. The JSON configuration file set is configured with a python command corresponding to the Slate control. When the user needs to implement a target control function, the user can click the Slate control corresponding to the target control function.
[0108] Correspondingly, when FTPython detects that the Slate control is clicked (i.e., the target control event), the target python instruction matching the target control event is queried in the JSON configuration file set, and then by querying the binding relationship between the pre-established python instruction and the python script, the corresponding python script stored in Python is called, and the control logic code in the python script is executed, thereby achieving the technical effect of updating the function display page according to the Slate control function.
[0109] Embodiment 3
[0110] Figure 3 This is a schematic diagram of a structure of a device for implementing extended functions based on a UE editor provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: an instruction response module 310, a file execution module 320 and an operation response module 330, wherein:
[0111] The instruction response module 310 is used to obtain a page configuration file corresponding to the target extended function in response to a trigger instruction for the target extended function in the UE editor.
[0112] The file execution module 320 is used to execute the page configuration file to generate a function display page matching the target extended function.
[0113] The operation response module 330 is used to respond to a trigger operation on a target control in the function display page and obtain a target script that matches the trigger operation.
[0114] The code execution module 340 is used to trigger the execution of the control logic code in the target script to implement the target control function.
[0115] The technical solution of the embodiment of the present invention predefines a page configuration file and a script file corresponding to the same extended function, and associates different controls in the page configuration file with scripts of different control logic codes in the script file. When the extended function is triggered to execute, the function display page can be displayed based on the page configuration file, and the control functions of different controls in the page configuration file can be realized based on different control logic codes defined in different scripts. The technical solution of the embodiment of the present invention can realize the low-cost, simple and efficient development of the extended function of the UE editor without changing the UE source code, effectively reducing the compilation cost in the extended function development process, and solving the problems of low blueprint information density and version conflicts easily caused by multi-person maintenance in the traditional extended UE editor method.
[0116] On the basis of the above embodiments, the page configuration file may be a JSON configuration file set; the target control may be a Slat control; and the target script may be a Python script.
[0117] Based on the above embodiments, the file execution module 320 can be specifically used for:
[0118] If the total number of 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;
[0119] Execute each configuration item in the main configuration file line by line to dynamically update the function display page;
[0120] When reading the key configuration field in the master configuration file, identifying the target slave configuration file that matches the key configuration field;
[0121] Jump to execute each configuration item in the target slave configuration file in the JSON configuration file set, and after the execution is completed, return 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 completed.
[0122] Based on the above embodiments, the operation response module 330 can be specifically used for:
[0123] Obtain a target control event that matches the trigger operation;
[0124] Query the page configuration file to obtain the target Python instruction that matches the target control event;
[0125] According to the binding relationship between the Python instruction and the Python script, the target script matching the target Python instruction is obtained.
[0126] On the basis of the above embodiments, the following may also be included:
[0127] The binding relationship establishment module is used to pre-establish the binding relationship between the python instruction and the python script through the lambda function in the python function library.
[0128] On the basis of the above embodiments, the following may also be included:
[0129] A control interface calling module is used to execute the target control interface in response to a call request for the target control interface after triggering the execution of the control logic code in the target script, so as to update and display the control corresponding to the target control interface in the function display page.
[0130] On the basis of the above embodiments, the device is configured on a function extension plug-in pre-installed in the UE editor;
[0131] The function extension plug-in is written in C++ language; and the target extension function is developed using the function extension plug-in.
[0132] The device for realizing extended functions based on the UE editor provided in the embodiment of the present invention can execute the method for realizing extended functions based on the UE editor provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0133] Embodiment 4
[0134] Figure 4A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0135] like Figure 4 As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate 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 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0136] 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, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0137] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the 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, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 41 executes the various methods and processes described above, such as the extended function implementation method based on the UE editor. That is:
[0138] In response to a trigger instruction for a target extended function in a UE editor, obtaining a page configuration file corresponding to the target extended function;
[0139] Executing the page configuration file to generate a function display page matching the target extended function;
[0140] In response to a trigger operation on a target control in a function display page, obtaining a target script matching the trigger operation;
[0141] Trigger the execution of the control logic code in the target script to implement the target control function.
[0142] In some embodiments, the method for implementing the extended function based on the UE editor may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on 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 method for implementing the extended function based on the UE editor described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the method for implementing the extended function based on the UE editor in any other appropriate manner (e.g., by means of firmware).
[0143] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0144] Computer programs 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, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0145] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0146] To provide interaction with a user, the systems and techniques described herein may 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 the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may 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 input, voice input, or tactile input).
[0147] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0148] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0149] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0150] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for implementing extended functions based on Unreal Engine UE editor, characterized in that: include: In response to a trigger instruction for a target extended function in a UE editor, obtaining a page configuration file corresponding to the target extended function; Executing the page configuration file to generate a function display page matching the target extended function; In response to a trigger operation on a target control in a function display page, obtaining a target script matching the trigger operation; Triggering the execution of the control logic code in the target script to implement the target control function; Wherein, 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; Wherein, executing the page configuration file includes: If the total number of 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 reading the key configuration field in the master configuration file, identifying the target slave configuration file that matches the key configuration field; Jump to execute each configuration item in the target slave configuration file in the JSON configuration file set, and after the execution is completed, return 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 completed.
2. The method according to claim 1, characterized in that Get the target script that matches the trigger operation, including: Obtain a target control event that matches the trigger operation; Query the page configuration file to obtain the target Python instruction that matches the target control event; According to the binding relationship between the Python instruction and the Python script, the target script matching the target Python instruction is obtained.
3. The method according to claim 2, characterized in that Also includes: A binding relationship between the python instruction and the python script is established in advance through the lambda function in the python function library.
4. The method according to claim 1, characterized in that: After triggering the execution of the control logic code in the target script, it also includes: In response to a call request to a target control interface, the target control interface is executed to update and display a control corresponding to the target control interface in the function display page.
5. The method according to any one of claims 1 to 4, characterized in that: The method is performed by a function extension plug-in pre-installed in the UE editor; The function extension plug-in is written in C++ language; and the target extension function is developed using the function extension plug-in.
6. A device for implementing extended functions based on Unreal Engine UE editor, characterized in that: include: An instruction response module, configured to obtain a page configuration file corresponding to the target extended function in response to a trigger instruction for the target extended function in the UE editor; A file execution module, used to execute the page configuration file and generate a function display page matching the target extended function; An operation response module, used to respond to a trigger operation on a target control in a function display page and obtain a target script matching the trigger operation; A code execution module, used to trigger the execution of the control logic code in the target script to implement the function of the target control; Wherein, 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; Wherein, the file execution module is specifically used for: If the total number of 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 reading the key configuration field in the master configuration file, identifying the target slave configuration file that matches the key configuration field; Jump to execute each configuration item in the target slave configuration file in the JSON configuration file set, and after the execution is completed, return 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 completed.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, 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 so that the at least one processor can execute the method for implementing extended functions based on the Unreal Engine UE editor as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for implementing extended functions based on the Unreal Engine UE editor according to any one of claims 1 to 5 when executed.
Citation Information
Patent Citations
Web page development method and device, computer equipment and readable storage medium
CN111752535A
Function extension method and device for code editor
CN115061669A
Web Content Extension System and Platform
US20180143949A1