CN113590327A - Project resource detection method and device, electronic equipment and storage medium - Google Patents

Project resource detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113590327A
CN113590327A CN202110879826.XA CN202110879826A CN113590327A CN 113590327 A CN113590327 A CN 113590327A CN 202110879826 A CN202110879826 A CN 202110879826A CN 113590327 A CN113590327 A CN 113590327A
Authority
CN
China
Prior art keywords
resource
loading
project
file
local
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
CN202110879826.XA
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.)
Shanghai Miha Youliyue Technology Co ltd
Original Assignee
Shanghai Miha Youliyue 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 Shanghai Miha Youliyue Technology Co ltd filed Critical Shanghai Miha Youliyue Technology Co ltd
Priority to CN202110879826.XA priority Critical patent/CN113590327A/en
Publication of CN113590327A publication Critical patent/CN113590327A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

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

Abstract

The embodiment of the invention discloses a project resource detection method and device, electronic equipment and a storage medium. The method detects the locally loaded project resources through the pre-constructed resource detection hook file loaded in the starting process of the editor of the target engine and the target loaded project resources in the resource server, and further determines whether to continue to execute the operation of starting the editor of the target engine according to the detection result, so that the automatic inspection of the project resources in the starting process of the editor is realized, the manual inspection of whether the project resources are overdue after the editor is completely started is not needed, the overdue project resources can be quickly discovered in the starting process of the editor, the inspection efficiency of the project resources is improved, and further, the development efficiency of the project is improved; meanwhile, restarting of the editor caused by overdue project resources is avoided, and memory occupied by engine operation is reduced.

Description

Project resource detection method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer application, in particular to a project resource detection method and device, electronic equipment and a storage medium.
Background
During the startup of a project engine editor, it is often necessary to load the various project resources required for project development or operation. If the expired project resources are loaded, a mistake is reported or a display error occurs during the running of the project, at the moment, the editor needs to be closed, then the project resources are manually updated, and the editor is restarted, so that the plug-in can be used.
At present, the way of checking whether project resources are expired is to manually check by professional technicians after an editor is started, and the checking time has a certain hysteresis; if the project resource is out of date, the editor needs to be restarted, and the loading of a plurality of program sets and the importing of the resource are involved in the starting process of the editor, so that the burden of the system resource and the waste of time are caused, and the project development efficiency is influenced.
Disclosure of Invention
The embodiment of the invention provides a project resource detection method and device, electronic equipment and a storage medium, which are used for improving the project resource detection efficiency and further improving the project development efficiency.
In a first aspect, an embodiment of the present invention provides a project resource detection method, including:
loading a pre-constructed resource detection hook file in the starting process of an editor of a target engine;
detecting local loading project resources based on the resource detection hook file and target loading project resources in the resource server;
and determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.
Optionally, the detecting a local loading project resource based on the resource detection hook file and a target loading project resource in the resource server includes:
and comparing the local configuration file of the local loading project resource with the remote configuration file of the target loading project resource in the resource server based on the resource detection hook file.
Optionally, the comparing, based on the resource detection hook file, the local configuration file of the local loading project resource with the remote configuration file of the target loading project resource in the resource server includes:
and comparing the local updating time information of the local configuration file of the local loading project resource with the remote updating time information of the remote configuration file of the target loading project resource in the resource server based on the resource detection class in the resource detection hook file.
Optionally, the determining whether to continue to perform the operation of opening the editor of the target engine based on the detection result includes:
and if the local configuration file is inconsistent with the remote configuration file, updating the local loading project resource to the target loading project resource based on the resource updating class in the resource detection hook file, and continuing to execute the operation of starting an editor of a target engine.
Optionally, the updating the local loading project resource to the target loading project resource based on the resource update class in the resource detection hook file includes:
and calling a resource updating class in the resource detection hook file, pulling the target loading project resource from the resource server based on the remote configuration file, and replacing the local loading project resource with the corresponding target loading project resource.
Optionally, the determining whether to continue to perform the operation of opening the editor of the target engine based on the detection result includes:
and if the local configuration file is consistent with the remote configuration file, continuing to execute the operation of opening the editor of the target engine.
Optionally, at least one of the following operations is performed:
loading a native code library of the target engine;
loading an engine plug-in layer program set of the target engine;
loading a project engineering program set constructed in advance;
loading a pre-constructed third-party software development kit program set;
the loading of the pre-built resource detection hook file comprises at least one of the following operations:
when the loading of the native code library of the target engine is finished, loading a pre-constructed resource detection hook file; or,
when the loading of the engine plug-in layer program set of the target engine is finished, loading a pre-constructed resource detection hook file; or,
when loading of a pre-constructed project engineering program set is completed, loading a pre-constructed resource detection hook file; in the alternative to this, either,
and when the loading of the pre-constructed third-party software development kit program set is completed, loading the pre-constructed resource detection hook file.
In a second aspect, an embodiment of the present invention further provides an apparatus for detecting project resources, including:
the hook file loading module is used for loading a pre-constructed resource detection hook file in the starting process of an editor of a target engine;
the project resource detection module is used for detecting local loading project resources based on the resource detection hook file and target loading project resources in the resource server;
and the opening operation execution module is used for determining whether to continue executing the operation of opening the editor of the target engine based on the detection result.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a project resource detection method as provided by any of the embodiments of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the project resource detection method provided in any embodiment of the present invention.
The embodiment of the invention has the following advantages or beneficial effects:
the method comprises the steps that a local loading project resource is detected through a pre-constructed resource detection hook file loaded in the starting process of an editor of a target engine and a target loading project resource in a resource server, and whether the operation of starting the editor of the target engine is continuously executed or not is further determined according to the detection result, so that the automatic detection of the project resource in the starting process of the editor is realized, the condition that whether the project resource is overdue or not is not manually detected after the editor is completely started is not needed, the overdue project resource can be rapidly discovered in the starting process of the editor, the detection efficiency of the project resource is improved, and further, the development efficiency of the project is improved; meanwhile, restarting of the editor caused by overdue project resources is avoided, and memory occupied by engine operation is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of a project resource detection method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a project resource detection method according to a second embodiment of the present invention;
fig. 3 is a schematic flowchart of a project resource detection method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a project resource detection apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a project resource detection method according to an embodiment of the present invention, where the present embodiment is applicable to a situation where a project resource is detected in a process of starting an editor of an engine, and the method may be executed by a project resource detection apparatus, where the apparatus may be implemented by hardware and/or software, and the method specifically includes the following steps:
s110, loading a pre-constructed resource detection hook file in the starting process of the editor of the target engine.
Where the target engine may be the engine that is currently launching the editor. Illustratively, the target engine may be a tool that provides developers with a large number of core technologies, basic support, or function calls. For example, the target engine may be a game engine including, but not limited to, a Unity engine, a ghost engine, a script engine, a physics engine, a rendering engine, and a web engine, among others. Taking a rendering engine as an example, all effects such as character models, animations, light shadows, special effects and the like can be calculated in real time by using the rendering engine and displayed on a screen; taking the physical engine as an example, the physical engine can be used for enabling the motion of objects in the game to follow a fixed rule, such as the jump height of a specified character, the running speed, the flying speed, the moving track of a move style and the like.
In this embodiment, the starting process of the editor of the target engine may include the following steps: 1. initializing a basic configuration of a target engine; 2. compiling all codes of the target engine; 3. importing project resources of a target engine; 4. and importing a numerical value file of the target engine.
Wherein all codes of the compiled target engine include: a native code library of the target engine, a plug-in layer code of the target engine, an overall code of the project of the target engine, and a third party library of the target engine or a plug-in library of a software development kit. Project resources of the target engine may include resources such as character models, building models, weapon models, maps, actions, bones, prefab preforms, and so on. The value file of the target engine can be a file describing a model basic value, an action related value or a scene related value; such as model height values, weapon appearance values, weapon firing values, character motion speed values, special effect time values, scene transparency values, and the like.
Specifically, in this embodiment, a pre-constructed resource detection hook file may be loaded in any step in the starting process of the editor of the target engine.
In this embodiment, the pre-constructed resource detection hook file may be a file for performing project resource detection. Specifically, the resource detection hook file may include an instruction to call a project resource detection method. The resource detection hook file may be a hook file, such as a,. dll file,. lab file, etc. Illustratively, the resource detection hook file may be an enginepreentryhook.
Optionally, an engineering enginereentryhook may be pre-constructed based on a C # generation dll method of the target engine, so as to generate an enginereentryhook. Optionally, the enginepreentryhook.dll file may be placed under an EngineDll directory in the project engineering, and maintained separately and independently from dll files inside other engines; the EnginePreEntryHook.dll file under the EngineDll directory within the project is automatically map-updated after each write of the EnginePreEntryHook internal code.
In an embodiment, in order to further improve the detection efficiency of the project resource, a pre-constructed resource detection hook file may be loaded before the numeric file of the target engine is imported in the starting process of the editor, so as to detect the project resource before the numeric file is imported, thereby reducing the detection time of the project resource; or before the project resource of the target engine is imported, the pre-constructed resource detection hook file is loaded to detect the project resource before the project resource is imported, and the project resource is updated in time when the project resource is expired.
In another embodiment, considering that the operation of compiling all the codes of the target engine may change the project resource, a pre-constructed resource detection hook file may be loaded after compiling all the codes of the target engine and before importing the project resource of the target engine, so that the detection accuracy of the project resource is ensured and the detection efficiency of the project resource is improved.
In another embodiment, a pre-constructed resource detection hook file may also be loaded during the process of compiling the entire code of the target engine. That is, the present embodiment provides the project resource detection method further including performing at least one of the following operations:
loading a native code library of a target engine; loading an engine plug-in layer program set of a target engine; loading a project engineering program set constructed in advance; loading a pre-constructed third-party software development kit program set;
the loading of the pre-built resource detection hook file comprises at least one of the following operations:
when the loading of a native code library of a target engine is finished, loading a pre-constructed resource detection hook file; or when the loading of the engine plug-in layer program set of the target engine is finished, loading a pre-constructed resource detection hook file; or when the loading of the pre-constructed project engineering program set is finished, loading the pre-constructed resource detection hook file; or when the loading of the pre-constructed third-party software development kit program set is completed, loading the pre-constructed resource detection hook file.
Wherein the native code library of the target engine may contain the base code of the target engine; for example, a native code library may contain a UnityEngine series dll file. The engine plug-in layer assembly of the target engine may contain plug-in layer code or program code that calls native code; such as dll files containing package and plugin families. The pre-constructed project engineering assembly may include all program codes of the project engineering; such as the complete program code of a game Project, may be dll file code of Project series. The set of pre-built third party Software Development Kit packages may contain a third party library or plug-in library files of an SDK (Software Development Kit). Illustratively, the third party software development kit package may be a sound effect Wwise, a game SDK, or the like.
Specifically, in this alternative embodiment, at least one of loading a native code library of the target engine, loading an engine plug-in layer program set of the target engine, loading a pre-constructed project engineering program set, and loading a pre-constructed third-party software development kit program set may be included to compile at least one of the native code library, the engine plug-in layer program set, the project engineering program set, and the third-party software development kit program set. Of course, the method for detecting project resources provided in this embodiment may further include all the loading steps, and it should be noted that, when all the loading steps are included, the loading sequence is as follows: a native code library, an engine plug-in layer assembly, a project engineering assembly, and a third party software development kit assembly.
In this alternative embodiment, the resource detection hook file may be loaded when the native code library loading of the target engine is completed; or when the loading of the engine plug-in layer program set of the target engine is finished, loading the resource detection hook file; or loading a pre-constructed resource detection hook file when the loading of the pre-constructed project engineering program set is finished; or loading the pre-constructed resource detection hook file when the loading of the pre-constructed third-party software development kit program set is completed. By loading the pre-constructed resource detection hook file when the loading of the native code library, the engine plug-in layer program set, the project engineering program set or the third-party software development tool kit program set is completed, the detection of the project resources can be completed before the loading of the engine plug-in layer program set, the project engineering program set or the third-party software development tool kit program set, the checking time of the project resources is further reduced, the checking efficiency of the project resources is improved, the starting time of an editor of an engine is reduced, and the development efficiency of the project is greatly improved.
Optionally, the engine load code of the target engine may be modified, and the resource detection hook file is sent to a first priority load queue (native code library load queue), so that the resource detection hook file is loaded after the native code library is loaded. According to the method, only the resource detection hook file is added to the first priority loading queue, the whole target engine does not need to be adjusted, and the applicability of the project resource detection method provided by the embodiment is improved.
Certainly, in this embodiment, when the native code library of the target engine is compiled, a hook (resource detection hook file) may be added for compiling, and when the pre-constructed project engineering assembly is compiled, the project resource is detected through hook triggering.
And S120, detecting the local loading project resource based on the resource detection hook file and the target loading project resource in the resource server.
The locally loaded project resource may be a locally stored project resource corresponding to an editor for starting the target engine. The target load project resource may be a project resource stored in a resource server that is needed to launch an editor of the target engine. The resource server can locally store the project resources corresponding to the engines in the server; alternatively, a repository storing project resources is connected and project resources are read from the repository.
For example, a target load item resource corresponding to the target engine may be queried in the resource server according to the engine identifier of the target engine. The target load item resource may be the latest version of the item resource corresponding to the target engine, or may not be the latest version of the item resource. If so, the version of the target loading item resource corresponding to the engine a is 4.1.1; the version of the target load item resource corresponding to the engine b is 4.1.2.
Specifically, the detection of the local loading project resource based on the resource detection hook file and the target loading project resource in the resource server may be: and triggering the operation of detecting the local loading project resource based on the target loading project resource in the resource server through the resource detection hook file.
Optionally, the detecting the local load item resource based on the resource detection hook file and the target load item resource in the resource server may include at least one of the following:
detecting the resource version of the local loading project resource based on the resource detection hook file and the resource version of the target loading project resource in the resource server;
detecting the version time of the local loading project resource based on the resource detection hook file and the version time of the target loading project resource in the resource server;
detecting the resource version and the resource updating time of the local loading project resource based on the resource detection hook file and the resource version and the resource updating time of the target loading project resource in the resource server;
and detecting the resource content of the local loading project resource based on the resource detection hook file and the resource content of the target loading project resource in the resource server.
If the resource version of the target loading project resource is consistent with the resource version of the local loading project resource, the detection result may be that the detection is passed. Or, if the resource update time of the target loading project resource is consistent with the resource update time of the local loading project resource, the detection result may be that the detection is passed. Or, if the resource content of the target loading project resource is consistent with the resource content of the local loading project resource, the detection result may be that the detection is passed.
And S130, determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.
In this embodiment, if the detection result is that the detection is passed, it may be determined that the local loading item resource is not expired, and the operation of starting the editor of the target engine may be continuously performed. If the detection result is that the operation of starting the editor of the target engine is failed, the operation of starting the editor of the target engine can be suspended, the local loading project resource is updated according to the target loading project resource, and the operation of starting the editor of the target engine is continuously executed based on the updated local loading project resource.
For example, if the resource detection hook file is loaded when the native code library of the target engine is loaded, when the pre-constructed project engineering assembly is loaded, the local loaded project resource is detected based on the resource detection hook file and the target loaded project resource in the resource server, and the detection result indicates that the detection is passed, the operation of loading the pre-constructed third-party software development kit assembly can be continuously executed, so that the operation of starting the editor of the target engine is continuously executed; if the detection result is that the detection fails, the operation of the editor for starting the target engine may be stopped.
According to the technical scheme of the embodiment, the local loaded project resource is detected through the pre-constructed resource detection hook file loaded in the starting process of the editor of the target engine and the target loaded project resource in the resource server, and whether the operation of starting the editor of the target engine is continuously executed or not is further determined according to the detection result, so that the automatic check of the project resource in the starting process of the editor is realized, the manual check of whether the project resource is overdue or not after the editor is completely started is not needed, the overdue project resource can be quickly found in the starting process of the editor, the checking efficiency of the project resource is improved, further, the starting time of the editor of the engine is shortened, and the development efficiency of the project is improved; meanwhile, restarting of the editor caused by overdue project resources is avoided, and memory occupied by engine operation is reduced.
In the scheme that the editor needs to be completely started in the prior art, and if the editor reflects a fault, the project resource is manually updated, and the complete startup of the editor needs at least 20 minutes, so that the project resource detection needs at least 20 minutes in the prior art, the project resource detection method provided by the application can quickly complete the project resource detection in a shorter time, for example, within 30 seconds of the startup process of the editor of the target engine, whether the project resource is expired is detected, and the latest project resource is automatically pulled when the project resource is expired.
Example two
Fig. 2 is a schematic flow chart of a project resource detection method according to a second embodiment of the present invention, where this embodiment, on the basis of the foregoing embodiments, optionally detects a locally loaded project resource based on a resource detection hook file and a target loaded project resource in a resource server, and includes: and comparing the local configuration file of the local loading project resource with the remote configuration file of the target loading project resource in the resource server based on the resource detection hook file.
Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. Referring to fig. 2, the project resource detection method provided by this embodiment includes the following steps:
s210, loading a pre-constructed resource detection hook file in the starting process of the editor of the target engine.
S220, comparing the local configuration file of the local loading project resource with the remote configuration file of the target loading project resource in the resource server based on the resource detection hook file.
The local configuration file can be a file used for describing resource information of the locally loaded project resource; the remote configuration file may be a file of resource information describing the target load project resource. Optionally, the remote configuration file may be stored in the resource server, or stored in a database corresponding to the resource server. For example, the present embodiment may read a remote configuration file of the target loading item resource from the resource server through the engine identifier of the target engine.
In this embodiment, comparing the local configuration file of the local loading project resource with the remote configuration file of the target loading project resource in the resource server based on the resource detection hook file may be: and triggering the operation of comparing the local configuration file of the local loading project resource with the remote configuration file of the target loading project resource in the resource server through the resource detection hook file.
Specifically, comparing the local configuration file of the local loading project resource with the remote configuration file of the target loading project resource in the resource server may be: comparing the file version of the local configuration file with the file version of the remote configuration file; or comparing the file content of the local configuration file with the file content of the remote configuration file.
In an embodiment, comparing the file content of the local configuration file with the file content of the remote configuration file may be: and determining a local file hash value corresponding to the local configuration file and a remote file hash value corresponding to the remote configuration file, and comparing the local file hash value with the remote file hash value.
And S230, determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.
Specifically, if the file version of the local configuration file is consistent with the file version of the remote configuration file, the detection result is that the detection is passed; and if the file version of the local configuration file is inconsistent with the file version of the remote configuration file, the detection result is that the detection is failed.
Or if the file content of the local configuration file is consistent with the file content of the remote configuration file, the detection result is that the detection is passed; and if the file content of the local configuration file is inconsistent with the file content of the remote configuration file, the detection result is that the detection is failed.
Optionally, determining whether to continue to perform the operation of opening the editor of the target engine based on the detection result includes: and if the local configuration file is inconsistent with the remote configuration file, updating the local loading project resource into the target loading project resource based on the resource updating class in the resource detection hook file, and continuing to execute the operation of starting the editor of the target engine.
The resource update class may be a file class previously written in the resource detection hook file for updating the locally loaded project resource. In particular, the resource update class may contain program code that invokes an update method for locally loaded project resources. For example, the C # resource update class PEAssetsUpdater may be written within the EnginePreEntryhook project.
In this optional embodiment, when the local configuration file is inconsistent with the remote configuration file, the local loading project resource may be updated to the target loading project resource according to the resource update class, and the operation of starting the editor of the target engine is continuously executed after the local loading project resource is updated, so that the automatic update of the project resource is realized, the editor does not need to be restarted or the project resource does not need to be re-imported, the starting time of the editor is reduced, and the development efficiency of the project is further improved.
Optionally, determining whether to continue to perform the operation of opening the editor of the target engine based on the detection result includes: and if the local configuration file is consistent with the remote configuration file, continuing to execute the operation of opening the editor of the target engine.
In a specific embodiment, updating a local load item resource to a target load item resource based on a resource update class in a resource detection hook file includes: and calling a resource updating class in the resource detection hook file, pulling the target loading project resource from the resource server based on the remote configuration file, and replacing the local loading project resource with the corresponding target loading project resource.
Specifically, the target loading project resource corresponding to the file identifier can be pulled from the resource server through the file identifier of the remote configuration file, and the local loading project resource is replaced by the target loading project resource. The optional implementation mode realizes automatic updating of the project resources, and improves the checking efficiency of the project resources and the starting efficiency of the editor compared with the traditional mode of manually updating the project resources.
According to the technical scheme, the local configuration file of the local loading project resource is compared with the remote configuration file of the target loading project resource in the resource server through the pre-constructed resource detection hook file, so that the project resource is detected through the configuration file, the detection efficiency of the project resource is further improved, the starting time of the editor is further shortened, and the development efficiency of the project is improved.
EXAMPLE III
Fig. 3 is a schematic flow chart of a project resource detection method according to a third embodiment of the present invention, where this embodiment optionally compares, based on the resource detection hook file, a local configuration file of a local loading project resource with a remote configuration file of a target loading project resource in a resource server, and includes: and comparing the local updating time information of the local configuration file of the local loading project resource with the remote updating time information of the remote configuration file of the target loading project resource in the resource server based on the resource detection class in the resource detection hook file.
Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. Referring to fig. 3, the project resource detection method provided by this embodiment includes the following steps:
s310, loading a pre-constructed resource detection hook file in the starting process of the editor of the target engine.
S320, comparing the local updating time information of the local configuration file of the local loading project resource with the remote updating time information of the remote configuration file of the target loading project resource in the resource server based on the resource detection class in the resource detection hook file.
The resource detection class may be a class file written in the resource detection hook file in advance and used for triggering comparison between the local configuration file and the remote configuration file. The resource detection class may contain program code that calls a profile comparison method. Illustratively, the C # resource detection class PASsetschecking may be written within the EnginePreEntryhook project.
In this embodiment, the local update time may be the latest modification time of the local configuration file, and the remote update time may be the latest modification time of the remote configuration file.
Specifically, if the local update time is the same as the remote update time, it may be indicated that, after the local configuration file is pulled from the resource server, both the local configuration file and the remote configuration file in the resource server are not modified, or the local configuration file and the remote configuration file in the resource server are modified synchronously. If the local update time is different from the remote update time, it may indicate that the remote configuration file in the resource server is modified after the local configuration file is pulled from the resource server, or the local configuration file is modified, or the local configuration file and the remote configuration file have different modification times.
For example, when the local update time is consistent with the remote update time, the detection result may be determined as passing detection; when the local updating time is earlier than the remote updating time, determining that the detection result is that the detection is not passed; and when the local updating time is later than the remote updating time, determining that the detection result is that the detection is passed.
In an optional implementation manner, in consideration of the situation that the file update time may be consistent but the local configuration file is still different from the remote configuration file, the file version of the local configuration file of the local loading project resource may be compared with the file version of the remote configuration file of the target loading project resource in the resource server based on the resource detection class in the resource detection hook file before the local update time information is compared with the remote update time information; and if the local file version is consistent with the remote file version, performing an operation of comparing the local update time information with the remote update time information.
In other words, detecting the local load item resource based on the resource detection hook file and the target load item resource in the resource server includes: and comparing the file version of the local configuration file with the file version of the remote configuration file, and comparing the local updating time with the remote updating time when the file version of the local configuration file is consistent with the file version of the remote configuration file. Specifically, when the local update time is consistent with the remote update time, the detection result is that the detection is passed; and when the local updating time is not consistent with the remote updating time or the file version of the local configuration file is not consistent with the file version of the remote configuration file, the detection result is that the detection is failed.
In the optional implementation manner, the comparison of the file versions can be performed first, and when the file versions are inconsistent, the comparison of the file update time does not need to be continued, so that the comparison efficiency between the local configuration file and the remote configuration file is further improved, meanwhile, the situation that the file update time is consistent but the file versions are not simultaneously detected and passed is avoided, the comparison accuracy between the local configuration file and the remote configuration file is improved, and the situation that the numerical values or the codes are not matched due to the error of project resources is reduced.
Of course, in this embodiment, when the local update time information of the local configuration file is consistent with the remote update time information of the remote configuration file, the file content of the local configuration file may be compared with the file content of the remote configuration file, so as to further ensure the accuracy of the comparison between the local configuration file and the remote configuration file. The comparison of the file contents may be based on the hash value of the file.
And S330, determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.
Illustratively, if the local update time is consistent with the remote update time, the detection result is that the detection is passed; and if the local updating time is not consistent with the remote updating time, the detection result is that the detection is failed.
Of course, after the local update time information is compared with the remote update time information, if the local update time is consistent with the remote update time, the file content of the local configuration file is continuously compared with the file content of the remote configuration file, at this time, if the file content of the local configuration file is consistent with the file content of the remote configuration file, the detection result is that the detection is passed, and if the file content of the local configuration file is not consistent with the file content of the remote configuration file, the detection result is that the detection is not passed.
According to the technical scheme of the embodiment, the local update time information of the local configuration file is compared with the remote update time of the remote configuration file through the resource detection class of the resource detection hook file, the compared result is determined as the detection result, and the project resource detection is realized through the file update time, so that the project resource detection efficiency is further improved, the starting time of the editor is reduced, and the project development efficiency is further improved.
Example four
Fig. 4 is a schematic structural diagram of a project resource detection apparatus according to a fourth embodiment of the present invention, where this embodiment is applicable to a situation where a project resource is detected in a process of starting an editor of an engine, the apparatus specifically includes: a hook file loading module 410, a project resource detection module 420 and an open operation execution module 430.
The hook file loading module 410 is used for loading a pre-constructed resource detection hook file in the starting process of an editor of a target engine;
a project resource detection module 420, configured to detect a local loading project resource based on the resource detection hook file and a target loading project resource in the resource server;
and an opening operation executing module 430 for determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.
Optionally, the project resource detecting module 420 includes a file comparing unit, where the file comparing unit is configured to compare the local configuration file of the local loading project resource with the remote configuration file of the target loading project resource in the resource server based on the resource detection hook file.
Optionally, the file comparison unit is specifically configured to:
and comparing the local updating time information of the local configuration file of the local loading project resource with the remote updating time information of the remote configuration file of the target loading project resource in the resource server based on the resource detection class in the resource detection hook file.
Optionally, the opening operation executing module 430 includes a resource updating unit, and the resource updating unit is configured to update the local loading project resource to the target loading project resource based on a resource updating class in the resource detection hook file if the local configuration file is inconsistent with the remote configuration file, and continue to execute the operation of opening the editor of the target engine.
Optionally, the resource updating unit is specifically configured to:
if the local configuration file is inconsistent with the remote configuration file, calling a resource updating class in the resource detection hook file, pulling the target loading project resource from the resource server based on the remote configuration file, and replacing the local loading project resource with the corresponding target loading project resource.
Optionally, the opening operation executing module 430 further includes a continuation starting unit, configured to continue to execute the operation of opening the editor of the target engine if the local configuration file is consistent with the remote configuration file.
Optionally, the project resource detection apparatus further includes a code loading module, where the code loading module is configured to perform at least one of the following operations:
loading a native code library of the target engine;
loading an engine plug-in layer program set of the target engine;
loading a project engineering program set constructed in advance;
loading a pre-constructed third-party software development kit program set;
the hook file loading module 410 includes a file loading unit configured to perform at least one of the following operations:
when the loading of the native code library of the target engine is finished, loading a pre-constructed resource detection hook file; or,
when the loading of the engine plug-in layer program set of the target engine is finished, loading a pre-constructed resource detection hook file; or,
when loading of a pre-constructed project engineering program set is completed, loading a pre-constructed resource detection hook file; in the alternative to this, either,
and when the loading of the pre-constructed third-party software development kit program set is completed, loading the pre-constructed resource detection hook file.
In this embodiment, a pre-constructed resource detection hook file is loaded in the starting process of an editor of a target engine through a hook file loading module, a project resource detection module detects a local loaded project resource based on the resource detection hook file and the target loaded project resource in a resource server, and then an operation execution module is started to determine whether to continue to execute the operation of starting the editor of the target engine according to the detection result, so that the automatic check of the project resource in the starting process of the editor is realized, and the manual check of whether the project resource is overdue after the editor is completely started is not needed, so that the overdue project resource can be quickly found in the starting process of the editor, the checking efficiency of the project resource is improved, and further, the development efficiency of the project is improved; meanwhile, restarting of the editor caused by overdue project resources is avoided, and memory occupied by engine operation is reduced.
The project resource detection device provided by the embodiment of the invention can execute the project resource detection method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the system are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 5 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention. The device 12 is typically an electronic device that assumes the functionality of detecting project assets upon starting the engine editor.
As shown in FIG. 5, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that couples the various components (including the memory 28 and the processing unit 16).
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer-readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer device readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only, the storage device 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product 40, with program product 40 having a set of program modules 42 configured to carry out the functions of embodiments of the invention. Program product 40 may be stored, for example, in memory 28, and such program modules 42 include, but are not limited to, one or more application programs, other program modules, and program data, each of which examples or some combination may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, mouse, camera, etc., and display), one or more devices that enable a user to interact with electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network such as the internet) via the Network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) devices, tape drives, and data backup storage devices, to name a few.
The processor 16 executes various functional applications and data processing by running the program stored in the memory 28, for example, implementing the project resource detection method provided by the above embodiment of the present invention, including:
loading a pre-constructed resource detection hook file in the starting process of an editor of a target engine;
detecting local loading project resources based on the resource detection hook file and target loading project resources in the resource server;
and determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.
Of course, those skilled in the art can understand that the processor can also implement the technical solution of the project resource detection method provided by any embodiment of the present invention.
EXAMPLE six
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the project resource detection method provided in any embodiment of the present invention, where the method includes:
loading a pre-constructed resource detection hook file in the starting process of an editor of a target engine;
detecting local loading project resources based on the resource detection hook file and target loading project resources in the resource server;
and determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A project resource detection method is characterized by comprising the following steps:
loading a pre-constructed resource detection hook file in the starting process of an editor of a target engine;
detecting local loading project resources based on the resource detection hook file and target loading project resources in the resource server;
and determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.
2. The method of claim 1, wherein the detecting a local load item resource based on the resource detection hook file and a target load item resource in a resource server comprises:
and comparing the local configuration file of the local loading project resource with the remote configuration file of the target loading project resource in the resource server based on the resource detection hook file.
3. The method of claim 2, wherein comparing the local configuration file of the locally loaded project resource to the remote configuration file of the target loaded project resource in the resource server based on the resource detection hook file comprises:
and comparing the local updating time information of the local configuration file of the local loading project resource with the remote updating time information of the remote configuration file of the target loading project resource in the resource server based on the resource detection class in the resource detection hook file.
4. The method of claim 2, wherein determining whether to continue executing the operation of opening the editor of the target engine based on the detection result comprises:
and if the local configuration file is inconsistent with the remote configuration file, updating the local loading project resource to the target loading project resource based on the resource updating class in the resource detection hook file, and continuing to execute the operation of starting an editor of a target engine.
5. The method of claim 4, wherein updating the local load item resource to the target load item resource based on a resource update class in the resource detection hook file comprises:
and calling a resource updating class in the resource detection hook file, pulling the target loading project resource from the resource server based on the remote configuration file, and replacing the local loading project resource with the corresponding target loading project resource.
6. The method of claim 5, wherein determining whether to continue executing the operation of opening the editor of the target engine based on the detection result comprises:
and if the local configuration file is consistent with the remote configuration file, continuing to execute the operation of opening the editor of the target engine.
7. The method of claim 1, further comprising performing at least one of:
loading a native code library of the target engine;
loading an engine plug-in layer program set of the target engine;
loading a project engineering program set constructed in advance;
loading a pre-constructed third-party software development kit program set;
the loading of the pre-built resource detection hook file comprises at least one of the following operations:
when the loading of the native code library of the target engine is finished, loading a pre-constructed resource detection hook file; or,
when the loading of the engine plug-in layer program set of the target engine is finished, loading a pre-constructed resource detection hook file; or,
when loading of a pre-constructed project engineering program set is completed, loading a pre-constructed resource detection hook file; in the alternative to this, either,
and when the loading of the pre-constructed third-party software development kit program set is completed, loading the pre-constructed resource detection hook file.
8. An apparatus for detecting a project resource, comprising:
the hook file loading module is used for loading a pre-constructed resource detection hook file in the starting process of an editor of a target engine;
the project resource detection module is used for detecting local loading project resources based on the resource detection hook file and target loading project resources in the resource server;
and the opening operation execution module is used for determining whether to continue executing the operation of opening the editor of the target engine based on the detection result.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the project resource detection method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the project resource detection method according to any one of claims 1 to 7.
CN202110879826.XA 2021-08-02 2021-08-02 Project resource detection method and device, electronic equipment and storage medium Pending CN113590327A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110879826.XA CN113590327A (en) 2021-08-02 2021-08-02 Project resource detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110879826.XA CN113590327A (en) 2021-08-02 2021-08-02 Project resource detection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113590327A true CN113590327A (en) 2021-11-02

Family

ID=78253550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110879826.XA Pending CN113590327A (en) 2021-08-02 2021-08-02 Project resource detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113590327A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115826933A (en) * 2023-02-14 2023-03-21 成都曾自科技有限公司 Method and device for loading resources using Cook under editor and storage medium
CN116401147A (en) * 2023-02-08 2023-07-07 深圳开源互联网安全技术有限公司 Function library reference version detection method, equipment and storage medium
CN116863040A (en) * 2023-05-29 2023-10-10 上海幻维数码科技有限公司 Multi-person collaboration system based on engine building

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446874A (en) * 2014-09-25 2016-03-30 北京畅游天下网络技术有限公司 Method and device for detecting resource configuration file
CN112667315A (en) * 2020-12-23 2021-04-16 上海米哈游天命科技有限公司 Game engine editor starting method and device, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446874A (en) * 2014-09-25 2016-03-30 北京畅游天下网络技术有限公司 Method and device for detecting resource configuration file
CN112667315A (en) * 2020-12-23 2021-04-16 上海米哈游天命科技有限公司 Game engine editor starting method and device, electronic equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116401147A (en) * 2023-02-08 2023-07-07 深圳开源互联网安全技术有限公司 Function library reference version detection method, equipment and storage medium
CN116401147B (en) * 2023-02-08 2024-05-03 深圳开源互联网安全技术有限公司 Function library reference version detection method, equipment and storage medium
CN115826933A (en) * 2023-02-14 2023-03-21 成都曾自科技有限公司 Method and device for loading resources using Cook under editor and storage medium
CN115826933B (en) * 2023-02-14 2023-06-13 成都曾自科技有限公司 Method, device and storage medium for loading and using Cook post-resource under editor
CN116863040A (en) * 2023-05-29 2023-10-10 上海幻维数码科技有限公司 Multi-person collaboration system based on engine building

Similar Documents

Publication Publication Date Title
CN113590327A (en) Project resource detection method and device, electronic equipment and storage medium
US8627296B1 (en) Unified unit and integration test with automatic mock creation
CN110502357A (en) A kind of stack retrogressive method, device, medium and equipment
CN111385633B (en) Resource searching method based on voice, intelligent terminal and storage medium
CN112667315A (en) Game engine editor starting method and device, electronic equipment and storage medium
US10839124B1 (en) Interactive compilation of software to a hardware language to satisfy formal verification constraints
CN109284222B (en) Software unit, project testing method, device and equipment in data processing system
US20120222023A1 (en) Automatic runtime dependency lookup
CN113590225B (en) Mapping detection method and device, electronic equipment and storage medium
CN115080114B (en) Application program transplanting processing method, device and medium
CN113590446B (en) Method and device for detecting numerical value file, electronic equipment and storage medium
CN113590179B (en) Plug-in detection method and device, electronic equipment and storage medium
CN113590221B (en) Method and device for detecting number of shader variants, electronic equipment and storage medium
CN115858556A (en) Data processing method and device, storage medium and electronic equipment
CN113590224B (en) Method and device for detecting server, electronic equipment and storage medium
CN113590228A (en) Starting method and device of engine editor, electronic equipment and storage medium
CN113591149A (en) Folder permission detection method and device, electronic equipment and storage medium
CN112667310A (en) Game engine editor starting method and device, electronic equipment and storage medium
CN113590226B (en) Method and device for starting engine editor, electronic equipment and storage medium
CN110147227A (en) A kind of program installation kit generation method and system for technical ability configuration
CN115421785B (en) Method, device and medium for transplanting application program
CN114911541B (en) Processing method and device of configuration information, electronic equipment and storage medium
CN113590223A (en) Starting method and device of engine editor, electronic equipment and storage medium
CN112604296B (en) Game updating method, electronic equipment and related system
CN113590220B (en) Method, device, electronic equipment and medium for detecting action resource configuration information

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