Search

CN-116048515-B - Virtual scene editing method, device, equipment and readable storage medium

CN116048515BCN 116048515 BCN116048515 BCN 116048515BCN-116048515-B

Abstract

The disclosure provides a virtual scene editing method, device, equipment and readable storage medium, wherein the virtual scene editing method comprises the steps of registering a UI component and an operation logic component into the same level of a target frame, wherein the target frame is a basic frame of a virtual scene editing function, the operation logic component operates in an operation environment of a virtual scene, responding to an editing request for the virtual scene, executing the virtual scene editing function according to logic of the UI component and the operation logic component in the operation environment of the virtual scene, and editing the virtual scene. The virtual scene editing method and device can carry out real-time visual editing on the virtual scene in the running environment of the virtual scene, and improves editing efficiency and effect of the virtual scene.

Inventors

  • LI YANG

Assignees

  • 北京新唐思创教育科技有限公司

Dates

Publication Date
20260512
Application Date
20230203

Claims (9)

  1. 1. A virtual scene editing method, the method comprising: Registering a UI component and a running logic component into the same level of a target frame, wherein the target frame is a basic frame of a virtual scene editing function, and the running logic component and the UI component both run in a running environment of a virtual scene; responding to the receiving of the editing request of the virtual scene, executing the virtual scene editing function according to the logic of the UI component and the operation logic component in the operation environment of the virtual scene, and editing the virtual scene; Wherein registering the UI component and the run logic component in the same hierarchy of the target framework comprises: Acquiring a UI port and a UI method corresponding to the UI component and an operation logic method corresponding to the operation logic component, wherein the UI port comprises an input port and an output port, and the UI method is used for processing the logic of the input port and the logic of the output port; adding the UI method and the run logic method to a registry, and registering the registry with the target framework.
  2. 2. The virtual scene editing method according to claim 1, wherein the obtaining the UI port corresponding to the UI component includes: Creating port types of the input port and the output port and sub-ports corresponding to the port types, wherein the sub-ports comprise a flow port, a component port and a value port; and obtaining the attribute value of the sub-port, wherein the attribute value comprises a main key, a link type, a data type, a name and a registration callback.
  3. 3. The virtual scene editing method according to claim 2, wherein the adding the UI method and the run logic method to a registry comprises: calling an operation logic method which is the same as the index value by taking the port type as the index value; and respectively defining the attribute values corresponding to the UI method and the operation logic method.
  4. 4. A virtual scene editing method as claimed in any of claims 2-3, further comprising: registering the updated UI method or the updated running logic method to the registry to modify the attribute value.
  5. 5. The virtual scene editing method according to claim 1, wherein said executing the virtual scene editing function according to the logic of the UI component and the execution logic component in the execution environment of the virtual scene in response to receiving an editing request for the virtual scene, editing the virtual scene, comprises: in response to receiving an editing request for the virtual scene, executing logic of the UI component, and displaying a UI control corresponding to the UI component on an interface of the virtual scene; And responding to the instruction of inputting the virtual scene editing function in the UI control, executing the logic of the operation logic component, and displaying the result of editing the virtual scene on the interface of the virtual scene.
  6. 6. The virtual scene editing method according to claim 5, wherein the UI control includes a first UI control for displaying a UI type and a UI control link relation, and a second UI control for receiving an instruction input content, the instruction of inputting the virtual scene editing function in the UI control including: responding to the selection operation of the first UI control, and displaying a second UI control corresponding to the UI type of the first UI control on an interface of the virtual scene; And inputting the instruction of the virtual scene editing function in the instruction input area of the second UI control.
  7. 7. A virtual scene editing apparatus, comprising: The component registration module is used for registering the UI component and the operation logic component into the same level of a target frame, wherein the target frame is a basic frame of a virtual scene editing function, and the operation logic component and the UI component are operated in an operation environment of a virtual scene; The scene editing module is used for responding to the receiving of the editing request of the virtual scene, executing the virtual scene editing function according to the logic of the UI component and the operation logic component in the operation environment of the virtual scene, and editing the virtual scene; Wherein the component registration module comprises: the data acquisition sub-module is used for acquiring a UI port and a UI method corresponding to the UI component and an operation logic method corresponding to the operation logic component, wherein the UI port comprises an input port and an output port, and the UI method is used for processing logic of the input port and logic of the output port; And the data adding sub-module is used for adding the UI method and the running logic method to a registry and registering the registry to the target framework.
  8. 8. An electronic device, the electronic device comprising: Processor, and A memory in which a program is stored, Wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the virtual scene editing method according to any of claims 1 to 6.
  9. 9. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the virtual scene editing method according to any one of claims 1 to 6.

Description

Virtual scene editing method, device, equipment and readable storage medium Technical Field The present application relates to the field of computer technologies, and in particular, to a virtual scene editing method, apparatus, device, and readable storage medium. Background After the virtual scene is constructed, the virtual scene can be edited by a visual editor such as a unit or unreal blueprint, for example, a plurality of UI components and matched logic components can be configured by the editor, the logic of the logic components is triggered in the virtual scene by activating a mode of connecting the UI components, and then the virtual scene is edited by adjusting component parameters. However, the editor cannot operate in the virtual scene, after the component parameters are adjusted in the editor, the program of the virtual scene needs to be restarted to update the editing result, so that when the programmer matches with the multiple editing requirements of upstream personnel, the program personnel need to adjust the component parameters multiple times and frequently start the program, and the editing efficiency is low. Moreover, the UI component and the logic component of the editor run in different environments, and the editing result corresponding to the modified component parameter cannot be displayed in real time in the current virtual scene, so that the effect of each editing cannot be optimal. Disclosure of Invention In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a method, an apparatus, a device, and a medium for editing a virtual scene, which can edit the virtual scene in real time and visually in an operating environment of the virtual scene, and improve editing efficiency and effect of the virtual scene. According to one aspect of the present disclosure, there is provided a virtual scene editing method, the method including registering a UI component and an operation logic component into the same hierarchy of a target frame, wherein the target frame is a basic frame of a virtual scene editing function, and the operation logic component operates in an operation environment of a virtual scene; And responding to the receiving of the editing request of the virtual scene, executing the virtual scene editing function according to the logic of the UI component and the operation logic component in the operation environment of the virtual scene, and editing the virtual scene. According to another aspect of the present disclosure, there is provided a virtual scene editing apparatus, including a component registration module configured to register a UI component and an operation logic component into a same hierarchy of a target frame, where the target frame is a basic frame of a virtual scene editing function, and the operation logic component operates in an operation environment of a virtual scene. And the scene editing module is used for responding to the receiving of the editing request of the virtual scene, executing the virtual scene editing function according to the logic of the UI component and the operation logic component in the operation environment of the virtual scene, and editing the virtual scene. According to another aspect of the present disclosure, there is provided an electronic device comprising a processor, and a memory storing a program, wherein the program comprises instructions that, when executed by the processor, cause the processor to perform the virtual scene editing method described above. According to another aspect of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the above-described virtual scene editing method. The method and the device for editing the virtual scene provided by the embodiment of the disclosure can register the UI component and the operation logic component in the same level of the target frame, wherein the target frame is a basic frame of a virtual scene editing function, and the operation logic component operates in an operation environment of the virtual scene. And then responding to the receiving of the editing request of the virtual scene, executing the virtual scene editing function according to the logic of the UI component and the operation logic component in the operation environment of the virtual scene, and editing the virtual scene. By adopting the technical scheme, the running logic component capable of running in real time in the virtual scene is developed, the UI component and the running logic component can be registered under the same level of the target frame based on the structure of the target frame, so that the functions of intercommunication, real-time updating, real-time response and the like of the UI component and the running logic component are realized, the logic of the running logic component is triggered or modified by the visual function of the UI component in the r