CN116661748A - Engine resource conversion method, device, equipment and storage medium - Google Patents

Engine resource conversion method, device, equipment and storage medium Download PDF

Info

Publication number
CN116661748A
CN116661748A CN202310488037.2A CN202310488037A CN116661748A CN 116661748 A CN116661748 A CN 116661748A CN 202310488037 A CN202310488037 A CN 202310488037A CN 116661748 A CN116661748 A CN 116661748A
Authority
CN
China
Prior art keywords
engine
resource
script
unit
creator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310488037.2A
Other languages
Chinese (zh)
Inventor
肖志明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tiantianlaiwan Technology Co ltd
Original Assignee
Shenzhen Tiantianlaiwan Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tiantianlaiwan Technology Co ltd filed Critical Shenzhen Tiantianlaiwan Technology Co ltd
Priority to CN202310488037.2A priority Critical patent/CN116661748A/en
Publication of CN116661748A publication Critical patent/CN116661748A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/63Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by the player, e.g. authoring using a level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The application discloses a method, a device, equipment and a storage medium for converting engine resources, belonging to the technical field of data processing, wherein the method comprises the following steps: when the game is developed in the units engine, editing the game based on the integrated counts creator engine resource in the units engine; the integrated countless engine resource is obtained by converting a script of an original countless engine into a language supported by a unit engine, converting a prefab resource of the original countless engine into a prefab format of the unit engine, and converting a Meta description file for describing the script and the prefab resource into a Meta description file supported by the unit engine.

Description

Engine resource conversion method, device, equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for converting engine resources.
Background
Currently, if a user wants to switch a countless engine item to a unit engine and develop a game by using the function of the countless engine item, the currently developed item needs to be packaged into the unit engine to complete the development of the game. The method can greatly increase the development time of the game and reduce the efficiency of game development.
Disclosure of Invention
The application mainly aims to provide an engine resource conversion method, an engine resource conversion device and a storage medium, and aims to solve the technical problem of low efficiency of game development.
In order to achieve the above object, the present application provides an engine resource conversion method, which includes the steps of:
when the game development is carried out in the units engine, editing the game based on the integrated counts creator engine resource in the units engine;
the integrated countless engine resource is obtained by converting a script of an original countless engine into a language supported by a unit engine, converting a prefab resource of the original countless engine into a prefab format of the unit engine, and converting a Meta description file for describing the script and the prefab resource into a Meta description file supported by the unit engine.
In one possible embodiment of the present application, when the game is developed in the unit engine, based on the resource of the co generator integrated in the unit engine, the method further includes, before the step of editing the game:
analyzing the script of the original cos creator engine through a preset compiler to obtain a corresponding abstract syntax tree;
and based on the abstract syntax tree, converting the script of the original cos creator engine from typescript language correspondence to lua language.
In one possible implementation manner of the present application, after the step of converting the script of the original cos creator engine from typescript language to lua language based on the abstract syntax tree, the method further includes:
binding the script of the lua language with the units prefabricated member resource through a custom component;
and when receiving a running instruction of the script of the lua language, calling the script of the lua language through a life cycle function of the unit engine.
In one possible embodiment of the present application, the step of binding, by a custom component, the script of the lua language with the unit prefabricated resource includes:
the attribute drawing content of the script of the lua language is read through a custom component, and the attribute drawing content is stored in the unit prefabricated member resource;
after the step of calling the lua language script through the lifecycle function of the units engine when receiving the running instruction of the lua language script, the method further comprises:
executing the script of the lua language based on the Meta description file of the unit prefabricated member resource.
In one possible embodiment of the present application, after the step of reading, by the custom component, the attribute rendering content of the script of the lua language, the method further includes:
based On the attribute drawing content, rewriting an On Injector GUI method, drawing a custom viewing window, and displaying the custom viewing window in a unit editor.
In one possible embodiment of the present application, after the step of reading, by the custom component, the attribute rendering content of the script of the lua language, the method further includes:
based On the attribute drawing content, rewriting an On Injector GUI method, drawing a custom viewing window, and displaying the custom viewing window in a unit editor.
In one possible implementation manner of the present application, the pre-form resource includes a counts creator component, and the method further includes, before the step of editing the game, during game development in the unit engine, based on the counts creator engine resource integrated in the unit engine:
based on the global unique identifier among the cos creators, converting the prefabricated member resource of the original cos creators from json structure to yaml structure, and obtaining the mapping relation between the cos creators and the built-in components of the units engine.
The application also provides an engine resource conversion device, which comprises:
and the engine resource conversion module is used for editing the game based on the integrated Cocos creator engine resource in the unit engine when the game is developed in the unit engine, wherein the integrated Cocos creator engine resource is obtained by converting a script of an original Cocos creator engine into a language supported by the unit engine, converting a prefab resource of the original Cocos creator engine into a prefab format of the unit engine and converting a Meta description file for describing the script and the prefab resource into a Meta description file supported by the unit engine.
The application also provides an engine resource conversion device, which comprises: a memory, a processor, and an engine resource conversion program stored on the memory and executable on the processor, the engine resource conversion program configured to implement the steps of the engine resource conversion method as set forth in any one of the preceding claims.
The present application also provides a storage medium having stored thereon an engine resource conversion program which, when executed by a processor, implements the steps of the engine resource conversion method as described in any one of the above.
Compared with the prior art, if a user wants to switch the function of a counts creator engine project into a unit engine, the user needs to finish the development of the game in the unit engine again. The method can greatly increase the development time of the game and reduce the efficiency of game development. When the game is developed in the units engine, editing the game based on the integrated counts creator engine resource in the units engine; the integrated countless engine resource is obtained by converting a script of an original countless engine into a language supported by a unit engine, converting a prefab resource of the original countless engine into a prefab format of the unit engine, and converting a Meta description file for describing the script and the prefab resource into a Meta description file supported by the unit engine. That is, the script, the prefabricated resource and the Meta description file of the original counto creator engine are respectively converted into a supportable language or format in the unit engine, so that the unit engine can identify the integrated counto creator resource through the converted Meta description file, and the game can be edited in the unit engine based on the integrated counto creator engine resource in the unit engine without returning the currently developed content to the unit engine to complete the development of the game. Therefore, the application can improve the efficiency of game development.
Drawings
FIG. 1 is a flowchart illustrating a first embodiment of an engine resource conversion method according to the present application;
FIG. 2 is a schematic diagram of an engine resource conversion device of a hardware running environment according to an embodiment of the present application;
fig. 3 is a schematic diagram of an engine resource conversion device according to a first embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. Although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope herein.
Referring to fig. 1, in this embodiment, the engine resource conversion method includes:
step S10: when the game is developed in the unit engine, editing the game based on the integrated cos generator engine resource in the unit engine, wherein the integrated cos generator engine resource is obtained by converting a script of an original cos generator engine into a language supported by the unit engine, converting a prefab resource of the original cos generator into a prefab format of the unit engine, and converting a Meta description file for describing the script and the prefab resource into a Meta description file supported by the unit engine.
As one example, an engine resource refers to an engine resource in a cos creator engine. Specifically, engine resources in the cos creator engine include script and pre-form resources. The preform is used to store scene objects that can be multiplexed, and the instance generated by the preform can inherit the data of the template, or can be modified on the instance. Specifically, the preform resource is made up of nodes, components, and data on the components.
As one example, engine resource conversion refers to converting engine resources in a counts creator engine to a units engine, enabling the units engine to identify engine resources in the converted counts creator engine.
As one example, the engine resource conversion method is applied to an engine resource conversion apparatus that is subordinate to an engine resource conversion device.
As an example, a Unity engine is a component-based development engine, a Unity editor and a script are integrated together, the Unity editor can bind the script for objects in a scene, and all objects and scripts in the scene are in the form of components, so that binding the script to one object can be performed. The cos creator engine is a game development engine that uses the object as a center and calls the components to edit the object. That is, the operation logic of the Unity engine and the cos creator engine are different.
As an example, in the process of using the unit engine to develop a game, if the user wants to use the function of the cos creator engine, because the running logic of the unit engine and the running logic of the cos creator engine are different, the user needs to package the currently developed content and then replace the content with the cos creator engine, and after using the function of the cos creator engine, the user needs to return to the unit engine again to complete the game development. The method can greatly increase the development time of the game and reduce the efficiency of game development.
The present embodiment aims at: after the engine resources in the counts creator engine are converted into the format supported by the unit engine, the unit engine can identify the engine resources in the converted counts creator engine. The user can directly use the engine resources in the converted cos creator engine in the units engine.
The method comprises the following specific steps:
step S10: when the game is developed in the unit engine, editing the game based on the integrated cos generator engine resource in the unit engine, wherein the integrated cos generator engine resource is obtained by converting a script of an original cos generator engine into a language supported by the unit engine, converting a prefab resource of the original cos generator into a prefab format of the unit engine, and converting a Meta description file for describing the script and the prefab resource into a Meta description file supported by the unit engine.
In this embodiment, the integrated countor engine resource refers to a countor engine resource integrated in the unit engine after converting the engine resource in the countor engine into the format supported by the unit engine.
In this embodiment, the integrated core engine resource is obtained by converting a script of an original core engine into a language supported by a unit engine, converting a prefab resource of the original core engine into a prefab format of the unit engine, and converting a Meta description file for describing the script and the prefab resource into a Meta description file supported by the unit engine.
As one example, the languages supported by the units engine include the C# language, and the like.
As an example, the script language of the original cos creator engine includes javascript language, typescript language, and the like.
As an example, the language conversion is converted by a preset compiler.
As one example, the preform format of a units engine is typically a yaml structure, which is a linguistic structure describing a configuration file.
As an example, the preform format of the cos creator engine is typically a json (javascript object notation, json object numbered musical notation) structure, which is a language structure that describes data based on the text format of the javascript language.
As an example, yaml and json structures are each based on a globally unique identifier (Globally Unique Identifier, GUID), binding nodes, components in the preform, and parent-child level relationships exist between nodes, components.
In this embodiment, the pre-configured resource includes a node and a counts creator component, and when the game is developed in the unit engine, based on the counts creator engine resource integrated in the unit engine, before the step of editing the game, the method further includes:
step S20: based on the global unique identifier among the cos creators, converting the prefabricated member resource of the original cos creators from json structure to yaml structure, and obtaining the mapping relation between the cos creators and the built-in components of the units engine.
As an example, since yaml structure and json structure are all binding nodes and components in the prefabricated member based on the global unique identifier, the prefabricated member resource of the original cos creator engine is converted from json structure to yaml structure based on the global unique identifier among the components of the original cos creator, that is, the binding relationship of the components corresponding to the global unique identifier is mapped, and the converted prefabricated member resource of the original cos creator engine can be obtained. Therefore, after the prefabricated resource is converted from json structure to yaml structure, the mapping relationship between the cos creator component and the built-in component of the unit engine can be obtained as shown in the following table 1.
Mapping relationship between the cos creator component and the built-in component of the units engine described in Table 1
As an example, after converting the prefabricated component resource of the original counts creator engine into the prefabricated component format of the unit engine, the unit engine may identify the prefabricated component resource of the original counts creator engine through the mapping relationship between the counts creator component and the built-in component of the unit engine.
As an example, a Meta description file is used to record a globally unique identifier of the script and the preform resource, as well as configuration information.
As an example, the Meta description file of the cos creator engine and the Meta description file of the units engine are both in Meta format. However, the structure of the Meta description file supported by the counts creator engine is json structure, and the structure of the Meta description file supported by the units engine is yaml structure.
Because the Meta description file is used to record the globally unique identifier of the script and the pre-form resource and the configuration information, the Meta description file of the cos creator engine needs to be converted from json structure to yaml structure, so that the unit engine can identify the engine resource (the script and the pre-form resource) of the cos creator engine.
In this embodiment, in the process of performing the conversion of the engine resource of the original cos creator engine, the basic functions of the engine resource of the original cos creator engine, such as the naming manner and the relationship between components, are also reserved, so that the quick conversion is facilitated, and the use of the user is facilitated.
In this embodiment, by converting a script of an original counts creator engine into a language supported by a unit engine, converting a prefabricated member resource of the original counts creator engine into a prefabricated member format of the unit engine, and respectively converting Meta description files for describing the script and the prefabricated member resource into formats supported by the unit engine, a counts creator engine resource which can be identified by the unit engine is obtained. When the game is developed in the unit engine, the unit engine can call the identifiable countless engine resource for the user to use based on the countless engine resource integrated in the unit engine to edit the game. The efficiency of game development is improved.
Further, based on the above embodiment of the present application, another embodiment of the present application is provided, in this embodiment, when the game development is performed in the unit engine, based on the resource of the co generator integrated in the unit engine, before the step of editing the game, the method further includes:
step S30: analyzing the script of the original cos creator engine through a preset compiler to obtain a corresponding abstract syntax tree;
as an example, the script of the original cos creator engine is parsed by a pre-set compiler, to obtain a corresponding abstract syntax tree (Abstract Syntax Tree, AST), wherein the abstract syntax tree is an abstract representation of the syntax structure of the script. The abstract syntax tree represents the syntax structure of the programming language in the form of a tree, each node on the tree representing a structure in the script. The preset compiler may be js2lua, weback, etc., which is not specifically limited.
Specifically, the step of converting the script into the abstract syntax tree is to perform lexical analysis and syntax analysis on the script, represent the syntax structure in a tree form, form the abstract syntax tree, have a plurality of tree nodes on the abstract syntax tree, and have a plurality of layers, each layer has the same structure, and each layer structure is called a tree node, the tree node may contain required attributes, and only the script is converted into the abstract syntax tree, the abstract syntax tree can be identified by the plug-in the preset compiler.
Step S40: and based on the abstract syntax tree, converting the script of the original cos creator engine from typescript language correspondence to lua language.
As an example, since the lua language is a lightweight and compact scripting language, which is written in a standard C language and is opened in a source code form, in order to implement a hot update function of the converted cos creator engine resource, the script of the original cos creator engine is correspondingly converted from typescript language to lua language based on the abstract syntax tree in consideration of the lightweight and compact characteristics of the lua language.
In this embodiment, after the step of converting the script of the original cos creator engine from typescript language to lua language based on the abstract syntax tree, the method further includes:
step S50: binding the script of the lua language with the units prefabricated member resource through a custom component;
as an example, since the converted cos creator script is in lua language and the unit itself does not support lua language, the converted cos creator script cannot be drag-bound to an object or other node in the unit editor and cannot be serialized (the process of converting the state information of the object into a form that can be stored or transmitted) into the pre-form resource.
Therefore, the script of the lua language needs to be bound to the units prefabricated resource through a custom component.
As an example, a custom component is a prefabricated component. Specifically, custom components
In this embodiment, the step of binding, by the custom component, the script of the lua language with the unit prefabricated member resource includes:
step A1: the attribute drawing content of the script of the lua language is read through a custom component, and the attribute drawing content is stored in the unit prefabricated member resource;
as an example, through a custom component, attribute drawing content (Properties attribute) of the lua language script is read, each script has attribute information such as parameter configuration and data definition, and the attribute drawing content is stored in the unit prefabricated member resource, so that the lua language script and the unit prefabricated member resource can be bound. The units engine can recognize the lua language script, i.e., the lua language script can be drag-bound to objects or other nodes in the units editor and can be serialized into the pre-form resource.
Step S80: and when receiving a running instruction of the script of the lua language, calling the script of the lua language through a life cycle function of the unit engine.
As an example, when receiving an execution instruction of the lua language script (user trigger or system auto trigger, etc.), the lua language script may be executed by invoking the lua language script through a lifecycle function of the unit engine.
As an example, the lifecycle functions of the units engine include Awake (Start), start (Update), fixed Update, late Update, on GUI (screen Update), and the like.
Wherein, when receiving the running instruction of the lua language script, the method further comprises the following steps of calling the lua language script through the life cycle function of the unit engine:
step S70: executing the script of the lua language based on the Meta description file of the unit prefabricated member resource.
As an example, after invoking the script in the lua language through the lifecycle function of the unit engine, the unit engine executes the script in the lua language based on the Meta description file of the unit pre-form resource. Drag binding in the units editor to an object or other node may be implemented and the lua script executed or updated.
In this embodiment, in order to enable the script of the original counts creator engine to satisfy the hot update function after being converted to the unit engine, the script of the original counts creator engine is correspondingly converted from the typescript language to the lua language, the script of the lua language is bound with the unit prefabricated member resource through a custom component, when an operation instruction of the script of the lua language is received, the script of the lua language is called through a life cycle function of the unit engine, and the script of the lua language is executed based on a Meta description file of the unit prefabricated member resource. The implementation is to drag bind to an object or other node in the units editor and execute or update the lua script.
Further, based on the above embodiment of the present application, there is provided another embodiment of the present application, in which, after the step of reading, by a custom component, attribute rendering contents of a script of the lua language, the method further includes:
step S90: based On the attribute drawing content, rewriting an On Injector GUI method, drawing a custom viewing window, and displaying the custom viewing window in a unit editor.
As an example, because the unit does not support the lua language, the attribute information of the lua language script cannot be displayed in the unit editor, the content is drawn based On the attribute, the On instrument GUI method is rewritten, a custom viewing window is drawn, and the custom viewing window is displayed in the unit editor to access the problem of visualizing script attributes.
As an example, after the step of reading the attribute drawing content of the script of the lua language through the custom component, the attribute drawing content is saved in the user data of the Meta description file of the unit engine, the On instance GUI method is rewritten based On the attribute drawing content, a custom viewing window is created, the custom viewing window is displayed in the unit editor, and the user can view the attribute drawing content of the script through the custom viewing window.
In this embodiment, based On the attribute drawing content, the On indicator GUI method is rewritten, a custom viewing window is drawn, and the custom viewing window is displayed in a unit editor, through which a user can view the attribute drawing content of the script, thereby solving the problem of visualizing the script.
Further, according to the foregoing embodiment of the present application, there is provided another embodiment of the present application, in which the custom component is a GDK Properties Pro Component component, and the step of binding, by the custom component, the script of the lua language with the units prefabricated resource includes:
step B1: prefabricating a plurality of GDK Properties Pro Component components, and respectively binding a plurality of scripts of the lua language with the units prefabricated resource through the plurality of GDK Properties Pro Component components.
In this embodiment, a plurality of GDK Properties Pro Component components are prefabricated, and a plurality of scripts in the lua language and the unit prefabricated member resource are respectively bound by the plurality of GDK Properties Pro Component components, so that when an operation instruction of the scripts in the lua language is received, the scripts in the lua language can be respectively called by a life cycle function of the unit engine. The running rate of the script in the lua language can be increased.
Referring to fig. 2, fig. 2 is a schematic device structure diagram of a hardware running environment according to an embodiment of the present application.
As shown in fig. 2, the engine resource conversion device may include: a processor 1001, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to enable connected communication between the processor 1001 and the memory 1005.
Optionally, the engine resource conversion device may further include a user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, a WiFi module, and the like. The user interface may include a Display, an input sub-module such as a Keyboard (Keyboard), and the optional user interface may also include a standard wired interface, a wireless interface. The network interface may include a standard wired interface, a wireless interface (e.g., WI-FI interface).
It will be appreciated by those skilled in the art that the engine resource conversion device structure shown in fig. 2 does not constitute a limitation of the engine resource conversion device, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 2, an operating system, a network communication module, and an engine resource conversion program may be included in the memory 1005 as one type of storage medium. An operating system is a program that manages and controls the engine resource conversion device hardware and software resources, supporting the operation of the engine resource conversion program and other software and/or programs. The network communication module is used to enable communication between components within the memory 1005 and other hardware and software in the engine resource conversion system.
In the engine resource conversion device shown in fig. 2, the processor 1001 is configured to execute an engine resource conversion program stored in the memory 1005, and implement the steps of the engine resource conversion method described in any one of the above.
The specific implementation manner of the engine resource conversion device of the present application is basically the same as that of each embodiment of the engine resource conversion method, and will not be described herein.
The application also provides an engine resource conversion device, as shown in fig. 3, which comprises:
and the engine resource conversion module 10 is used for editing the game based on the integrated countor engine resource in the unit engine when the game is developed in the unit engine, wherein the integrated countor engine resource is obtained by converting the script of the original countor engine into the language supported by the unit engine, converting the prefab resource of the original countor engine into the prefab format of the unit engine, and converting the Meta description file for describing the script and the prefab resource into the Meta description file supported by the unit engine.
Optionally, in one possible implementation manner of the present application, when the game is developed in the unit engine, based on the resource of the co creator engine integrated in the unit engine, before the step of editing the game, the method further includes:
the analysis module is used for analyzing the script of the original cos creator engine through a preset compiler to obtain a corresponding abstract syntax tree;
the language conversion is based on the abstract syntax tree, and the script of the original cos creator engine is correspondingly converted from typescript language to lua language.
Optionally, in a possible implementation manner of the present application, after the step of converting the script of the original cos creator engine from typescript language correspondence to lua language based on the abstract syntax tree, the apparatus further includes:
the script binding module is used for binding the script of the lua language with the units prefabricated member resource through the custom component;
and the script calling module is used for calling the script of the lua language through the life cycle function of the unit engine when receiving the running instruction of the script of the lua language.
Optionally, in a possible embodiment of the present application, the script binding module includes:
the attribute reading unit is used for reading attribute drawing contents of the scripts of the lua language through the custom component and storing the attribute drawing contents into the units prefabricated member resource;
wherein, when receiving the running instruction of the lua language script, the device further comprises:
and the script execution module is used for executing the script of the lua language based on the Meta description file of the unit prefabricated member resource.
Optionally, in a possible implementation manner of the present application, after the step of reading, by a custom component, attribute drawing content of a script of the lua language, the apparatus further includes:
and the custom module is used for drawing the content based On the attribute, rewriting the On Injector GUI method, drawing a custom viewing window and displaying the custom viewing window in a unit editor.
Optionally, in a possible embodiment of the present application, the script binding module includes:
and the component prefabrication module is used for prefabricating a plurality of GDK Properties Pro Component components, and respectively binding a plurality of scripts in the lua language with the units prefabrication resource through the GDK Properties Pro Component components.
Optionally, in one possible implementation manner of the present application, the pre-form resource includes a counts creator component, and the before the step of editing the game based on the counts creator engine resource integrated in the unit engine when the game is developed in the unit engine, the apparatus further includes:
and the component mapping module is used for converting the prefabricated member resource of the original cos creator engine from json structure to yaml structure based on the global unique identifier among the cos creator components to obtain the mapping relation between the cos creator components and the built-in components of the unit engine.
The specific implementation manner of the engine resource conversion device of the present application is basically the same as that of each embodiment of the engine resource conversion method, and will not be described herein.
The present application also provides a storage medium having stored thereon an engine resource conversion program which, when executed by a processor, implements the steps of the engine resource conversion method as described in any one of the above.
The specific implementation manner of the storage medium of the present application is basically the same as that of each embodiment of the engine resource conversion method, and will not be repeated here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. An engine resource conversion method, which is characterized by comprising the following steps:
when the game development is carried out in the units engine, editing the game based on the integrated counts creator engine resource in the units engine;
the integrated countless engine resource is obtained by converting a script of an original countless engine into a language supported by a unit engine, converting a prefab resource of the original countless engine into a prefab format of the unit engine, and converting a Meta description file for describing the script and the prefab resource into a Meta description file supported by the unit engine.
2. The engine resource conversion method as claimed in claim 1, wherein said step of editing said game based on a cos creator engine resource integrated in said unit engine, when said game development is performed in said unit engine, further comprises:
analyzing the script of the original cos creator engine through a preset compiler to obtain a corresponding abstract syntax tree;
and based on the abstract syntax tree, converting the script of the original cos creator engine from typescript language correspondence to lua language.
3. The engine resource conversion method as claimed in claim 2, wherein after the step of converting the script of the original cos creator engine from typescript language correspondence to lua language based on the abstract syntax tree, the method further comprises:
binding the script of the lua language with the units prefabricated member resource through a custom component;
and when receiving a running instruction of the script of the lua language, calling the script of the lua language through a life cycle function of the unit engine.
4. The engine resource conversion method as claimed in claim 3, wherein the step of binding the script of the lua language with the units prefabricated resource through a custom component comprises:
the attribute drawing content of the script of the lua language is read through a custom component, and the attribute drawing content is stored in the unit prefabricated member resource;
after the step of calling the lua language script through the lifecycle function of the units engine when receiving the running instruction of the lua language script, the method further comprises:
executing the script of the lua language based on the Meta description file of the unit prefabricated member resource.
5. The engine resource conversion method as claimed in claim 4, wherein after the step of reading the attribute drawing contents of the script of the lua language by the custom component, the method further comprises:
based On the attribute drawing content, rewriting an On Injector GUI method, drawing a custom viewing window, and displaying the custom viewing window in a unit editor.
6. The engine resource conversion method as claimed in claim 3, wherein the custom component is a GDK Properties Pro Component component, and the step of binding the script of the lua language with the units prefabricated resource by the custom component comprises:
prefabricating a plurality of GDK Properties Pro Component components, and respectively binding a plurality of scripts of the lua language with the units prefabricated resource through the plurality of GDK Properties Pro Component components.
7. The engine resource conversion method of claim 1, wherein the pre-cast resource comprises a counts creator component, and wherein the step of editing the game based on the counts creator engine resource integrated in the unit engine when the game is developed in the unit engine further comprises:
based on the global unique identifier among the cos creators, converting the prefabricated member resource of the original cos creators from json structure to yaml structure, and obtaining the mapping relation between the cos creators and the built-in components of the units engine.
8. An engine resource conversion apparatus, the apparatus comprising:
and the engine resource conversion module is used for editing the game based on the integrated Cocos creator engine resource in the unit engine when the game is developed in the unit engine, wherein the integrated Cocos creator engine resource is obtained by converting a script of an original Cocos creator engine into a language supported by the unit engine, converting a prefab resource of the original Cocos creator engine into a prefab format of the unit engine and converting a Meta description file for describing the script and the prefab resource into a Meta description file supported by the unit engine.
9. An engine resource conversion apparatus, characterized in that the apparatus comprises: a memory, a processor, and an engine resource conversion program stored on the memory and executable on the processor, the engine resource conversion program configured to implement the steps of the engine resource conversion method of any one of claims 1 to 7.
10. A storage medium having stored thereon an engine resource conversion program which, when executed by a processor, implements the steps of the engine resource conversion method as claimed in any one of claims 1 to 7.
CN202310488037.2A 2023-04-28 2023-04-28 Engine resource conversion method, device, equipment and storage medium Pending CN116661748A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310488037.2A CN116661748A (en) 2023-04-28 2023-04-28 Engine resource conversion method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310488037.2A CN116661748A (en) 2023-04-28 2023-04-28 Engine resource conversion method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116661748A true CN116661748A (en) 2023-08-29

Family

ID=87725075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310488037.2A Pending CN116661748A (en) 2023-04-28 2023-04-28 Engine resource conversion method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116661748A (en)

Similar Documents

Publication Publication Date Title
CN108984174B (en) Cross-platform application creation method, device, server and storage medium
FI118311B (en) Procedure, data processing apparatus, computer software product and arrangements for processing electronic data
US9158510B2 (en) System and computer program product for creating a telecommunications application
CN109445784B (en) Method and device for processing structure data, storage medium and electronic equipment
CN110764791A (en) Channel adaptation method and device of applet and electronic equipment
EP3848798A1 (en) Information processing method and apparatus, storage medium, and electronic device
CN113126990B (en) Page development method, device, equipment and storage medium
CN111068328A (en) Game advertisement configuration table generation method, terminal device and medium
CN112817657B (en) Application program starting item loading method, device, system and storage medium
CN109933381A (en) A kind of loading method and device of kernel
CN112083919A (en) YAML template-based target service code generation method and device
CN108170430B (en) Interface display method and system
CN116521181B (en) Script data processing method, device, equipment and medium based on game system
CN116661748A (en) Engine resource conversion method, device, equipment and storage medium
CN113641594B (en) Cross-terminal automatic testing method and related device
CN113590179B (en) Plug-in detection method and device, electronic equipment and storage medium
CN115934093A (en) Applet cross-terminal application method, related device and computer storage medium
CN115543324A (en) Method, device, equipment and medium for generating interactive interface
CN111124386B (en) Animation event processing method, device, equipment and storage medium based on Unity
CN111309319A (en) Inheritable office data dynamic page configuration method and device
CN111240679A (en) Page development method and system
CN111506314B (en) Project development method, device, server and medium
CN116595284B (en) Webpage system operation method, device, equipment, storage medium and program
CN115309376B (en) Application creation method and device, electronic equipment and storage medium
CN111506314A (en) Project development method, device, server and medium

Legal Events

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