A virtual scene editing method, device, equipment and readable storage medium
By registering UI components and logic components to the same target framework in the virtual scene's runtime environment, the problem of needing to restart the program in the editor is solved, enabling real-time visual editing of the virtual scene and improving editing efficiency and effectiveness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING XINTANG SICHUANG EDUCATIONAL TECH CO LTD
- Filing Date
- 2023-02-03
- Publication Date
- 2026-05-12
AI Technical Summary
The existing virtual scene editor requires restarting the virtual scene program after adjusting component parameters in the editor, resulting in low editing efficiency and the inability to display the editing results in real time.
Register UI components and runtime logic components to the same level of the target framework in the virtual scene, and edit them in real time in the runtime environment. The UI components trigger the logic of the logic components for editing.
It enables real-time visual editing of virtual scenes, improving editing efficiency and effectiveness, and displaying editing results without the need for frequent program restarts.
Smart Images

Figure CN116048515B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a virtual scene editing method, apparatus, device, and readable storage medium. Background Technology
[0002] Once the virtual scene is built, it can be edited using a visual editor such as Unity or Unreal Blueprint. For example, multiple UI components and their corresponding logic components can be configured in the editor. The logic of the logic components can be triggered in the virtual scene by activating and connecting the UI components. The virtual scene can then be edited by adjusting the component parameters.
[0003] However, the editor cannot run in the virtual scene. After adjusting component parameters in the editor, the virtual scene program needs to be restarted to update the editing results. This forces programmers to adjust component parameters multiple times and restart the program frequently when cooperating with upstream personnel for multiple editing requests, resulting in low editing efficiency. Furthermore, the editor's UI components and logic components run in different environments, and the editing results corresponding to changes in component parameters cannot be displayed in real time in the current virtual scene, causing each editing session to fail to achieve optimal results. Summary of the Invention
[0004] To address, or at least partially address, the aforementioned technical problems, this disclosure provides a virtual scene editing method, apparatus, device, and medium that enables real-time, visual editing of virtual scenes within the virtual scene's operating environment, thereby improving the efficiency and effectiveness of virtual scene editing.
[0005] According to one aspect of this disclosure, a virtual scene editing method is provided, the method comprising: registering UI components and runtime logic components to the same level of a target framework, wherein the target framework is the basic framework of the virtual scene editing function, and the runtime logic components run in the runtime environment of the virtual scene;
[0006] In response to receiving an editing request for the virtual scene, the virtual scene editing function is executed in the runtime environment of the virtual scene according to the logic of the UI component and the runtime logic component to edit the virtual scene.
[0007] According to another aspect of this disclosure, a virtual scene editing apparatus is provided, the apparatus comprising: a component registration module for registering UI components and runtime logic components to the same level of a target framework, wherein the target framework is the basic framework of the virtual scene editing function, and the runtime logic components run in the runtime environment of the virtual scene.
[0008] The scene editing module is used to respond to receiving an editing request for the virtual scene, and in the runtime environment of the virtual scene, execute the virtual scene editing function according to the logic of the UI component and the runtime logic component to edit the virtual scene.
[0009] According to another aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to perform the virtual scene editing method described above.
[0010] According to another aspect of this disclosure, a computer-readable storage medium is provided, the storage medium storing a computer program for performing the above-described virtual scene editing method.
[0011] The virtual scene editing method and apparatus provided in this embodiment can register UI components and runtime logic components at the same level of a target framework, wherein the target framework is the basic framework for the virtual scene editing function, and the runtime logic components run in the virtual scene's runtime environment. In response to receiving an editing request for the virtual scene, the virtual scene editing function is executed in the virtual scene's runtime environment according to the logic of the UI components and the runtime logic components to edit the virtual scene.
[0012] By adopting the above technical solution, and by developing a runtime logic component that can run in real time in a virtual scene, the UI component and the runtime logic component can be registered at the same level of the target framework based on the target framework's structure. This enables functions such as interoperability, real-time updates, and real-time responses between the UI component and the runtime logic component. In the virtual scene's runtime environment, the UI component's visualization function can be used to trigger or modify the logic of the runtime logic component, allowing for real-time visual editing of the virtual scene. The results of each editing operation can be displayed without restarting the virtual scene's program, thereby significantly improving the editing efficiency and effect of editing the virtual scene.
[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a schematic diagram illustrating an application scenario of a virtual scene editing system provided in this embodiment of the disclosure;
[0016] Figure 2 This is a flowchart illustrating a virtual scene editing method provided in an embodiment of this disclosure;
[0017] Figure 3 This is a schematic diagram of the structure of a target frame provided in an embodiment of this disclosure;
[0018] Figure 4 This is a schematic diagram of the port type and sub-port of a UI component provided in an embodiment of this disclosure;
[0019] Figure 5 This is a schematic diagram illustrating the activation connection between UI components provided in an embodiment of this disclosure;
[0020] Figure 6 This is a schematic diagram illustrating an embodiment of editing a virtual scene provided in this disclosure;
[0021] Figure 7 This is a schematic diagram of another virtual scene editing provided in this embodiment of the disclosure;
[0022] Figure 8 This is a schematic diagram of another virtual scene editing provided in this embodiment of the disclosure;
[0023] Figure 9 This is a schematic diagram of the structure of a virtual scene editing device provided in an embodiment of this disclosure;
[0024] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0025] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] This disclosure provides a virtual scene editing method, apparatus, device, and readable storage medium. The device can be an electronic device, and the readable storage medium can be a computer-readable storage medium. The virtual scene editing apparatus can be integrated into an electronic device, which can be a server or a terminal, etc.
[0027] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.
[0028] The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and the server can be connected directly or indirectly through wired or wireless communication, which is not limited herein.
[0029] For example, such as Figure 1 As shown, UI components and runtime logic components can be registered to the same level of the target framework through the server. The target framework is the basic framework of the virtual scene editing function, and the runtime logic component runs in the runtime environment of the virtual scene. In response to receiving an editing request for the virtual scene, the virtual scene editing function is executed in the runtime environment of the virtual scene according to the logic of the UI components and the runtime logic component to edit the virtual scene.
[0030] It should be noted that the steps performed by the server above can also be performed through the terminal to achieve real-time visual editing of the virtual scene.
[0031] In this disclosure, "multiple" refers to two or more. The terms "first" and "second," etc., used in this disclosure are for distinguishing descriptions and should not be construed as implying relative importance.
[0032] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0033] Figure 2 This is a flowchart illustrating a virtual scene editing method provided in an embodiment of this disclosure. The method can be executed by a virtual scene editing device, which can be implemented using software and / or hardware, and is generally integrated into an electronic device. Figure 2 As shown, the method mainly includes:
[0034] Step 101: Register the UI components and runtime logic components to the same level of the target framework.
[0035] The target framework serves as the basic framework for the virtual scene editing functionality. Please refer to [link / reference]. Figure 3 , Figure 3This is a schematic diagram of the structure of a target frame provided in an embodiment of this disclosure. For example... Figure 3 As shown, the target framework disclosed herein includes common hierarchical units such as runtime registrar, deserialization unit, serialization unit, persistence unit, translation layer, and core unit. The most crucial aspect of this target framework is the development of runtime logic components that can run in a virtual scene. The UI components and runtime logic components are laid out in the same layer, allowing the UI components and runtime logic components to run together in the runtime environment of the virtual scene. This overcomes the limitation that conventional editors cannot achieve the inability of UI components and logic components to run in the same runtime environment or communicate with each other.
[0036] As is understandable, UI components typically run on a canvas interface that doesn't display the virtual scene. By dragging out several UI component node controls on the canvas and activating the connections between them, methods of the UI components and logic components are triggered after the virtual scene's program starts. Subsequently, the virtual scene can be edited by modifying the parameters of these components. After the virtual scene's program starts, the methods or parameters of the running logic can be further modified in the details panel and details menu to perform editing operations on the virtual scene.
[0037] As can be seen from the above description, UI components and runtime logic components are each responsible for executing different logic in the virtual scene and run in different runtime environments. For example, UI components run in the canvas interface, and the corresponding logic mainly involves visual logic such as the appearance, quantity, and display form of node controls. On the other hand, logic components run in the virtual scene, and the corresponding logic mainly involves runtime logic in the virtual scene, such as the operation of turning on the lights in an indoor virtual scene, the indoor brightness after the lights are turned on, and the brightness of the lights. However, all of the above logic is triggered by the activation of node connections between UI components.
[0038] Therefore, in the process of editing a virtual scene, whether by modifying the parameters of UI components or running logic components, the virtual scene program needs to be restarted after each edit to display the changes brought about by the edit. However, with the method disclosed in this paper, UI components and running logic components can run together in the virtual scene's runtime environment to achieve real-time visual editing of the virtual scene. Moreover, each editing result is directly responded to and displayed in real time in the running virtual scene, realizing hot modification operations. This allows the editing results corresponding to each editing operation to be displayed more intuitively in the virtual environment, and there is no need to frequently restart the virtual scene, thereby greatly improving the editing effect and efficiency of the virtual scene.
[0039] Optionally, step 101 may also include the following steps:
[0040] Obtain the UI port and UI method corresponding to the UI component, and the running logic method corresponding to the running logic component, wherein the UI port includes an input port and an output port, and the UI method is used to process the logic of the input port and the logic of the output port;
[0041] Add the UI method and the execution logic method to the registry, and register the registry with the target framework.
[0042] It's understandable that by adding UI methods and runtime logic methods to the registry and registering the registry with the target framework, the logic of the UI methods and runtime logic methods can be implemented together within the virtual scene's runtime environment. It's worth noting that the specific values of the runtime logic methods in the registry can be written according to business requirements. For example, if developers want to implement brightness adjustment in the virtual scene, they can write logic methods related to brightness values and triggering brightness adjustment events.
[0043] Optionally, the step "obtain the UI port corresponding to the UI component" includes:
[0044] Create the port types of the input port and the output port, and the sub-ports corresponding to the port types, wherein the sub-ports include stream ports, component ports and value ports;
[0045] Obtain the attribute values of the sub-port, wherein the attribute values include primary key, link type, data type, name, and registration callback.
[0046] The port type defines the type of logical object that the component's logic operates upon when the UI component is activated. Figure 5 Taking UI control 'a' as an example, the port type of UI control 'a' is 'button', indicating that when the component logic of this UI component is triggered, it will act on the logic object of the button class. Accordingly, Figure 5 The port type of UI control b in the example is log, which means that when the component logic of this UI component is triggered, it will act on the log-type logic object.
[0047] Please see Figure 4 , Figure 4 This is a schematic diagram illustrating the port type and sub-ports of a UI component provided in an embodiment of this disclosure. For example... Figure 4 As shown, the input and output ports of a UI component can include sub-ports such as stream ports, component ports, and value ports. Each sub-port can define attribute values such as primary key, link type, data type, name, and registration callback.
[0048] It is understandable that the logic of the running logic component is implemented through the connection activation between various UI components. When the connection is activated, the output port of one UI component can be connected to the input port of another UI component. After activation, the next UI component can call the input value and method of the previous UI component by registering a callback to implement the logic of the running logic component. Other attribute values are used to cooperate with the execution of UI methods and the logic of running logic methods.
[0049] In some embodiments, the visual editing capabilities of UI components at runtime are fully implemented through Unity UGUI. This differs from existing editors which are implemented through the Unity API. By porting the capabilities originally available in the editor to the runtime environment, it is possible to achieve real-time editing of virtual scenes and for the editing results to take effect in real time.
[0050] Optionally, the step "adding the UI method and the runtime logic method to the registry" includes:
[0051] Using the value of the port type as an index, call the execution logic method that is the same as the value of the port type;
[0052] Add the UI method and the execution logic method to their respective attribute values.
[0053] To facilitate understanding of the above steps, let's take... Figure 5 Taking the registration of UI components as an example, the following UI methods and execution logic methods can be added to the registry:
[0054]
[0055]
[0056]
[0057] The registry defines UI control a with a port type of basic / button and UI control b with a port type of basic / log.
[0058] For UI component a of UI control a, the execution logic method of the button class is called with the port type basic / button as the index value. The output value of the On Click event is defined as a string through the execution logic method of the flow port. The component port's attribute value is defined as a button component named "Click" through the UI method. When the logic flow of the flow port is executed, the logic "setOutputData" of the output port is executed.
[0059] For UI component b, the execution logic method of the button class is called with the port type basic / log as the index value. The property value of its flow port flow is defined by the execution logic method: receive the data output by the previous node from the input port, call the function of the current node according to the callback data, execute the logic "getInputData" of the input port, and print the text format log file. The content of the log file is the string corresponding to the default value.
[0060] Based on the above explanation, after connecting and activating UI control a to UI control b, the following logic can be executed: In response to a click event on a button-type component, a text-formatted log file is generated, with the log file containing a default string.
[0061] Therefore, the method disclosed herein uses the port type of the UI component as the index value and assigns the attribute value of the UI component sub-port to the running logic method with the same index value, so as to generate a registry combining the UI method and the running logic method. This allows the UI component and the running logic component to run together in the virtual scene's runtime environment after the registry is registered to the target framework, and execute the logic of the UI method and the running logic method to edit the virtual scene.
[0062] Optionally, the method disclosed herein may further include the following steps:
[0063] Register the updated UI method or the updated runtime logic method to the registry to modify the attribute value.
[0064] It is understandable that in some virtual scene editing scenarios, UI methods and execution logic methods can be modified according to the editing requirements of the virtual scene to obtain updated UI methods and updated execution logic methods. In some embodiments, the updated UI methods and execution logic methods can be used to edit the corresponding virtual scene by modifying the attribute values of UI components.
[0065] Taking the logic implemented by UI control a connecting and activating UI control b as an example, if the new editing requirement in the virtual scene is to add the text "I am basic / log" to the printed log file, then the updated execution logic method can be added to UI control b, which is the downstream node, and the callback property value can be modified to achieve this editing requirement. The specific implementation code is as follows:
[0066]
[0067]
[0068] As can be seen, the callback property value registered in this UI component has a new field "pri nt("iam basic / log")", which allows for dynamic modification of UI component property values and real-time response to different editing needs of the virtual scene by adding the updated UI method or running logic method to the new registry.
[0069] Step 102: In response to receiving an editing request for the virtual scene, in the runtime environment of the virtual scene, according to the logic of the UI component and the runtime logic component, execute the virtual scene editing function to edit the virtual scene.
[0070] It is understandable that after registering the UI component and the runtime logic component to the target framework, the UI component and the runtime logic component can run together in the virtual scene environment. The UI component can be directly displayed in the virtual scene based on the logic of the UI method, and the logic of the runtime logic component can be triggered or modified with the powerful visualization function of the UI component to realize real-time visual editing operations on the virtual scene. The actual editing operation of the virtual scene will be explained in detail below.
[0071] Optionally, step 102 may also include the following steps:
[0072] In response to receiving an editing request for the virtual scene, the logic of the UI component is executed, and the UI control corresponding to the UI component is displayed on the interface of the virtual scene;
[0073] In response to an instruction to edit the virtual scene input in the UI control, the logic of the running logic component is executed, and the result of editing the virtual scene is displayed on the interface of the virtual scene.
[0074] The UI controls may further include a first UI control for displaying the UI type and the linking relationships between UI controls, and a second UI control for receiving instruction input. See also... Figures 6 to 8 ,like Figures 6 to 8 As shown, the first and second UI controls can be directly displayed in the virtual scene interface based on the structure of the target framework.
[0075] Optionally, the step "entering instructions for the virtual scene editing function in the UI control" includes:
[0076] In response to the selection operation of the first UI control, a second UI control corresponding to the UI type of the first UI control is displayed on the interface of the virtual scene;
[0077] Enter the command for the virtual scene editing function in the command input area of the second UI control.
[0078] To facilitate the editing of this virtual scene, the actual compilation operation of the virtual scene will be explained in detail below, combining the logic of the UI component and the runtime logic component. In some embodiments, the registration code of the UI component can be represented as:
[0079]
[0080]
[0081]
[0082]
[0083] like Figure 6 As shown, the registration code of this UI component defines two UI controls, a first UI control and a second UI control, with port types "type="courseware / near NPC"" and "courseware / dialog" respectively. This indicates that the port type of the first UI control is "near NPC" and the port type of the second UI control is "dialog". Connecting and activating the first and second UI controls, the downstream node, the second UI control, registers a callback to the logic of the first UI control, "near the NPC named 'Farmer'". After this logic event is triggered, the current node's callback function processes the input port data "id", displaying the dialog content with an id value of 100075.
[0084] Specifically, such as Figure 6 As shown, users can select the first UI control with the port type "near NPC" by clicking with the cursor or by other means such as voice or touch. The second UI control with the name "near NPC" will then be displayed in the virtual scene interface. Users can then enter the corresponding editing command in the input area of the second UI control. For example, if the user enters the editing command "Uncle Farmer" of type text, it means that the logic of the UI component corresponding to the first UI control is "trigger subsequent node events when near NPC Uncle Farmer". Correspondingly, users can also enter the name of other NPCs, such as "Uncle Worker", and the logic of the UI component will be "trigger subsequent node events when near NPC Uncle Worker".
[0085] like Figure 7As shown, users can select another UI control with a port type of "dialog" using the same selection method. This will display a second UI control named "dialog" in the virtual scene interface. Then, users can enter corresponding editing commands in the input area of the second UI control. For example, if a user enters the text-type editing command "100075", it means that the logic of the UI component corresponding to the first UI control is "when approaching the NPC farmer, trigger the display of dialogue content numbered 100075 in the dialog box". Correspondingly, users can also enter other IDs, such as "100076", in which case the logic of the UI component will be "trigger the display of dialogue content numbered 100075 in the dialog box".
[0086] like Figure 8 As shown, with Figure 6 and Figure 7 The specific operation is similar. Users can select the first UI control with the port type "toast" using the same selection method. The second UI control named "toast" will then be displayed in the virtual scene interface. Users can then enter the corresponding editing command in the input area of the second UI control. For example, if a user enters the editing command "Uncle Farmer" with the type "text", it means that the logic of the UI component corresponding to the first UI control is "when approaching the NPC Uncle Farmer, trigger a pop-up window in the virtual scene interface to display the text content 'Uncle Farmer'". Correspondingly, users can also enter other NPC names, such as "Uncle Worker", and the logic of the UI component will be "when approaching the NPC Uncle Worker, trigger a pop-up window in the virtual scene interface to display the text content 'Uncle Worker'".
[0087] Therefore, this disclosure enables the registration of UI components and runtime logic components at the same level of the target framework, where the target framework is the basic framework for the virtual scene editing function, and the runtime logic component runs in the virtual scene's runtime environment. In response to receiving an editing request for the virtual scene, the virtual scene editing function is executed in the virtual scene's runtime environment according to the logic of the UI components and the runtime logic component, thus editing the virtual scene. Because this disclosure develops a runtime logic component that can run in real-time within the virtual scene, it can register UI components and runtime logic components at the same level of the target framework based on the target framework's structure, enabling functions such as interoperability, real-time updates, and real-time responses between the UI components and logic components. In the virtual scene's runtime environment, the UI components' visualization function triggers or modifies the logic of the runtime logic component, allowing for real-time visual editing of the virtual scene. The results of each editing operation can be displayed without restarting the virtual scene program, thereby significantly improving the editing efficiency and effectiveness of virtual scene editing.
[0088] The method described in the above embodiments will be further described in detail below.
[0089] Corresponding to the aforementioned virtual scene editing method, this disclosure also provides a virtual scene editing device. Figure 7 This is a schematic diagram of a virtual scene editing device provided in an embodiment of the present disclosure. The device can be implemented by software and / or hardware, and is generally integrated into an electronic device. Figure 7 As shown, the virtual scene editing device includes:
[0090] The component registration module 201 is used to register UI components and runtime logic components to the same level of the target framework, wherein the target framework is the basic framework of the virtual scene editing function, and the runtime logic components run in the runtime environment of the virtual scene.
[0091] The scene editing module 202 is used to respond to receiving an editing request for a virtual scene, and in the running environment of the virtual scene, execute the virtual scene editing function according to the logic of the UI component and the running logic component to edit the virtual scene.
[0092] In some embodiments, the component registration module 201 includes:
[0093] The data acquisition submodule is used to acquire the UI port and UI method corresponding to the UI component, as well as the running logic method corresponding to the running logic component. The UI port includes an input port and an output port, and the UI method is used to process the logic of the input port and the logic of the output port.
[0094] The data addition submodule is used to add the UI method and the running logic method to the registry, and register the registry to the target framework.
[0095] In some implementations, the data acquisition submodule includes:
[0096] The port type creation submodule is used to create the port types of the input port and the output port, as well as the sub-ports corresponding to the port types, wherein the sub-ports include stream ports, component ports and value ports;
[0097] The attribute value retrieval submodule is used to retrieve the attribute values of the sub-port, wherein the attribute values include primary key, link type, data type, name, and registration callback.
[0098] In some implementations, the data addition submodule is further specifically used for:
[0099] Using the value of the port type as an index, call the execution logic method that is the same as the value of the port type;
[0100] Add the UI method and the execution logic method to their respective attribute values.
[0101] In some embodiments, the virtual scene editing device further includes:
[0102] The data update module is used to register the updated UI method or the updated runtime logic method to the registry in order to modify the attribute value.
[0103] In some embodiments, the scene editing module 202 includes:
[0104] The first logic execution submodule is used to respond to receiving an editing request for the virtual scene, execute the logic of the UI component, and display the UI control corresponding to the UI component on the interface of the virtual scene;
[0105] The second logic execution submodule is used to execute the logic of the running logic component in response to the instruction of inputting the virtual scene editing function in the UI control, and to display the result of editing the virtual scene on the interface of the virtual scene.
[0106] In some implementations, the UI control includes a first UI control for displaying UI types and UI control linking relationships, and a second UI control for receiving instruction input content. The second logic execution submodule is further specifically used for:
[0107] In response to the selection operation of the first UI control, a second UI control corresponding to the UI type of the first UI control is displayed on the interface of the virtual scene;
[0108] Enter the command for the virtual scene editing function in the command input area of the second UI control.
[0109] Therefore, this disclosure enables the registration of UI components and runtime logic components at the same level of the target framework, where the target framework is the basic framework for the virtual scene editing function, and the runtime logic components run in the virtual scene's runtime environment. In response to receiving an editing request for the virtual scene, the virtual scene editing function is executed in the virtual scene's runtime environment according to the logic of the UI components and the runtime logic components, thereby editing the virtual scene. Because this disclosure develops runtime logic components that can run in real-time within the virtual scene, it can register UI components and runtime logic components at the same level of the target framework based on the target framework's structure, enabling functions such as interoperability, real-time updates, and real-time responses between UI components and logic components. In the virtual scene's runtime environment, the visualization function of the UI components triggers or modifies the logic of the runtime logic components, allowing for real-time visual editing of the virtual scene. The results of each editing operation can be displayed without restarting the virtual scene program, thus significantly improving the editing efficiency and effectiveness of virtual scene editing.
[0110] The virtual scene editing device provided in this disclosure can execute the virtual scene editing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.
[0111] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device embodiments can be referred to the corresponding process in the method embodiments, and will not be repeated here.
[0112] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0113] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the electronic device to perform a method according to an embodiment of this disclosure.
[0114] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.
[0115] Exemplary embodiments of this disclosure also provide a computer program product, including a computer program, wherein, when executed by a processor of a computer, the computer program is used to cause the computer to perform a method according to an embodiment of this disclosure.
[0116] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0117] Furthermore, embodiments of this disclosure can also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the virtual scene editing method provided in embodiments of this disclosure. The computer-readable storage medium can be any combination of one or more readable media. A readable medium can be a readable signal medium or a readable storage medium. A readable storage medium can be, for example, including but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0118] refer to Figure 8 The present invention describes a structural block diagram of an electronic device 300 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, 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 processors, cellular phones, smartphones, wearable devices, 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 disclosure described and / or claimed herein.
[0119] like Figure 8As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. The RAM 303 may also store various programs and data required for the operation of the device 300. The computing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0120] Multiple components in electronic device 300 are connected to I / O interface 305, including: input unit 306, output unit 307, storage unit 308, and communication unit 309. Input unit 306 can be any type of device capable of inputting information to electronic device 300. Input unit 306 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 307 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 308 may include, but is not limited to, disk and optical disk. Communication unit 309 allows electronic device 300 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0121] The computing unit 301 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above. For example, in some embodiments, the virtual scene editing methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 300 via ROM 302 and / or communication unit 309. In some embodiments, the computing unit 301 can be configured to perform virtual scene editing methods by any other suitable means (e.g., by means of firmware).
[0122] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to the processor or controller of a general-purpose computer, special-purpose computer, or other programmable virtual scene editing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0123] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0124] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0125] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the 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 can be received in any form (including sound input, voice input, or tactile input).
[0126] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0127] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.
[0128] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0129] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A virtual scene editing method characterized by, The method comprises: registering the UI component and the running logic component in the same level of a target framework, wherein the target framework is a basic framework of a virtual scene editing function, and the running logic component and the UI component are both running in a running environment of a virtual scene; in response to receiving an editing request for the virtual scene, executing the virtual scene editing function according to the logic of the UI component and the running logic component in the running environment of the virtual scene, and editing the virtual scene; wherein the registration of the UI component and the running logic component in the same level of the target framework comprises: obtaining a UI port and a UI method corresponding to the UI component, and a running logic method corresponding to the running logic component, wherein the UI port comprises an input port and an output port, the UI method is used to process the logic of the input port, and the logic of the output port; adding the UI method and the running logic method to a registry, and registering the registry to the target framework.
2. The virtual scene editing method of claim 1, wherein, The obtaining of the UI port corresponding to the UI component comprises: creating a port type of the input port and the output port, and a sub-port corresponding to the port type, wherein the sub-port comprises a stream port, a component port and a value port; obtaining an attribute value of the sub-port, wherein the attribute value comprises a primary key, a link type, a data type, a name and a registration callback.
3. The virtual scene editing method of claim 2, wherein, The adding of the UI method and the running logic method to the registry comprises: taking the port type as an index value, calling a running logic method same as the index value; defining the attribute value corresponding to the UI method and the running logic method respectively.
4. The virtual scene editing method of any one of claims 2-3, characterized in that, The method further comprises: registering the updated UI method or the updated running logic method to the registry to modify the attribute value.
5. The virtual scene editing method of claim 1, wherein, The response to receiving an editing request for the virtual scene, executing the virtual scene editing function according to the logic of the UI component and the running logic component in the running environment of the virtual scene, and editing the virtual scene comprises: in response to receiving an editing request for the virtual scene, executing the logic of the UI component, and displaying a UI control corresponding to the UI component in the interface of the virtual scene; in response to inputting an instruction of the virtual scene editing function in the UI control, executing the logic of the running logic component, and displaying a result of editing the virtual scene in the interface of the virtual scene.
6. The virtual scene editing method of claim 5, wherein, The UI control comprises a first UI control for displaying a UI type and a UI control link relationship, and a second UI control for receiving instruction input content, and the inputting of the instruction of the virtual scene editing function in the UI control comprises: in response to a selection operation on the first UI control, displaying a second UI control corresponding to the UI type of the first UI control in the interface of the virtual scene; inputting the instruction of the virtual scene editing function in the instruction input area of the second UI control.
7. A virtual scene editing apparatus characterized by comprising: comprises: The component registration module is configured to register the UI component and the running logic component into the same level of a target framework, wherein the target framework is a basic framework of a virtual scene editing function, and the running logic component and the UI component are both running in a running environment of a virtual scene. The scene editing module is configured to, in response to receiving an editing request for the virtual scene, execute the virtual scene editing function according to the logic of the UI component and the running logic component in the running environment of the virtual scene, and edit the virtual scene. The component registration module includes: The data acquisition submodule is configured to acquire a UI port and a UI method corresponding to the UI component, and a running logic method corresponding to the running logic component, wherein the UI port includes an input port and an output port, the UI method is used to process the logic of the input port, and the logic of the output port. The data addition submodule is configured to add the UI method and the running logic method to a registry, and register the registry to the target framework.
8. An electronic device, comprising: The electronic device includes: A processor; and A memory storing a program, The program includes instructions that, when executed by the processor, cause the processor to perform the virtual scene editing method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to cause the computer to perform the virtual scene editing method according to any one of claims 1 to 6.