CN114259732A - Method, system and medium for clearing picture resources in game development engine - Google Patents

Method, system and medium for clearing picture resources in game development engine Download PDF

Info

Publication number
CN114259732A
CN114259732A CN202111626001.3A CN202111626001A CN114259732A CN 114259732 A CN114259732 A CN 114259732A CN 202111626001 A CN202111626001 A CN 202111626001A CN 114259732 A CN114259732 A CN 114259732A
Authority
CN
China
Prior art keywords
resource
array
information
picture
file
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
CN202111626001.3A
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.)
Suzhou Jiugong Digital Technology Co ltd
Original Assignee
Suzhou Jiugong Digital 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 Suzhou Jiugong Digital Technology Co ltd filed Critical Suzhou Jiugong Digital Technology Co ltd
Priority to CN202111626001.3A priority Critical patent/CN114259732A/en
Publication of CN114259732A publication Critical patent/CN114259732A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method, a system and a medium for clearing picture resources in a game development engine, wherein the method comprises the following steps: setting a first keyword, and accessing a CocosCreator; acquiring a first project file in a CocosCreator; setting a picture reference file based on the first keyword and the first project file; accessing a method package in the CocosCreator, and executing array construction operation based on the picture reference file and the method package to obtain a non-reference resource array; configuring a resource operation interface, acquiring a resource cleaning requirement based on the non-reference resource array and the resource operation interface, and executing resource cleaning operation based on the resource cleaning requirement; the method and the device can realize automatic screening and displaying of the non-reference picture resources, intelligently perform designated cleaning on the non-reference picture resources according to the management requirements, have extremely high cleaning efficiency and precision, improve the maintainability of the game engine and reduce the resource occupation.

Description

Method, system and medium for clearing picture resources in game development engine
Technical Field
The invention relates to the technical field of game development, in particular to a method, a system and a medium for clearing picture resources in a game development engine.
Background
In the process of game development based on the CocosCreator, the updating iteration and modification of a game interface are required to be continuously carried out, and more non-reference picture resources can be generated under the long-time operation; due to the continuous updating iteration of the game interface, whether the non-reference picture resources have related references in the game interface after the updating iteration is difficult to be quickly determined;
the cleaning method adopted at present is that a developer traverses each non-reference picture resource and confirms the reference relationship, and finally after the traversal is finished, the picture resource is deleted according to the confirmed non-reference relationship, so that the whole process is extremely time-consuming, the workload is extremely high, and the risk of game collapse caused by mistaken deletion of resources is caused by the fact that manual operation has more uncertain factors;
in summary, the cleaning efficiency and the cleaning accuracy of the non-reference image resource cleaning method in the existing game development engine are low, and the maintainability of the game engine is affected.
Disclosure of Invention
The invention mainly solves the problem that the maintainability of a game engine is influenced because the cleaning efficiency and the cleaning accuracy of a non-reference picture resource cleaning method in the existing game development engine are low.
In order to solve the technical problems, the invention adopts a technical scheme that: the method for clearing the picture resources in the game development engine comprises the following steps:
screening the reference files:
setting a first keyword, and accessing a CocosCreator; acquiring a first project file in the CocosCreator; setting a picture reference file based on the first keyword and the first project file;
a resource array generating step:
accessing a method package in the CocosCreator, and executing array construction operation based on the picture reference file and the method package to obtain a non-reference resource array;
and a useless resource cleaning step:
and configuring a resource operation interface, acquiring a resource cleaning requirement based on the non-reference resource array and the resource operation interface, and executing resource cleaning operation based on the resource cleaning requirement.
As an improved scheme, the first project file comprises a plurality of resource reference files; the picture reference files comprise a prefabricated body file, a scene file, a frame animation file, a keel animation file, a Spine animation file, an artistic word font file and a bitmap font file;
the method packet is configured with a resource information query method; a path identification area and a resource information identification area are configured in the resource operation interface;
the step of setting a picture reference file based on the first keyword and the first project file further comprises: identifying a plurality of second keywords respectively corresponding to a plurality of resource reference files; calling a screening algorithm to screen out the second keywords matched with the first keywords from the second keywords; setting the screened second keyword as a third keyword; and setting the resource reference file corresponding to the third key as the picture reference file.
As an improved solution, the array construction operation includes:
creating a first array, a second array and a third array; setting first picture resource information, second picture resource information and third picture resource information;
calling the resource information query method to respectively query whether first reference resource information matched with the first picture resource information exists in the prefabricated body file and the scene file; if so, adding the first reference resource information to the first array to obtain a first resource reference array;
calling the resource information query method to query whether second reference resource information matched with the second picture resource information exists in the frame animation file, the keel animation file and the Spine animation file; if so, adding the second reference resource information to the second array to obtain a second resource reference array;
calling the resource information query method to query whether third reference resource information matched with the third picture resource information exists in the artistic word font file and the bitmap font file; if so, adding the third reference resource information to the third array to obtain a third resource reference array;
and executing resource reference confirmation operation based on the resource information query method, the first resource reference array, the second resource reference array and the third resource reference array to obtain the non-reference resource array.
As an improvement, the resource reference validation operation comprises:
calling the resource information query method to traverse a plurality of picture resources to be screened used in the CocosCreator; creating a fourth array, and acquiring a plurality of resource path information and a plurality of resource identification code information which are respectively matched with a plurality of picture resources to be screened from the Cocoscreator; placing a plurality of resource identification code information into the fourth array to obtain an array to be screened;
identifying first identification code information in the first referenced resource information in the first resource reference array; identifying second identification code information in the second referenced resource information in the second resource reference array; identifying third identifier information in the third referenced resource information in the third resource reference array;
judging whether the resource identifier information which is not matched with the first identifier information, the second identifier information and the third identifier information exists in the array to be screened, and if the resource identifier information exists, setting the resource identifier information as a non-reference resource identifier;
creating a fifth array, and confirming first path information matched with the non-reference resource identifier in a plurality of pieces of resource path information; and importing the non-reference resource identification code and the first path information into the fifth array to obtain the non-reference resource array.
As an improvement, the step of acquiring a resource cleaning requirement based on the non-reference resource array and the resource operation interface further includes:
setting a first quantity threshold value, and counting a second quantity of the non-reference resource identifiers in the non-reference resource array; comparing whether the second quantity reaches the first quantity threshold value;
if so, judging that the non-reference resource identification codes in the non-reference resource array comprise a plurality of first non-reference identification codes, and judging that the first path information in the non-reference resource array comprises a plurality of first non-reference resource paths respectively matched with the first non-reference identification codes; executing a first cleaning requirement acquisition step based on a plurality of first non-reference identification codes and a plurality of first non-reference resource paths;
if not, judging that the non-reference resource identification code in the non-reference resource array is a second non-reference identification code, and judging that the first path information in the non-reference resource array is a second non-reference resource path; and executing a second cleaning requirement acquisition step based on the second non-reference identification code and the second non-reference resource path.
As an improved solution, the first cleaning requirement obtaining step includes: acquiring a plurality of first picture resource files respectively matched with a plurality of first non-reference identification codes in the CocosCreator; uploading a plurality of first picture resource files in the resource information identification area of the resource operation interface; identifying the arrangement sequence of the first picture resource files in the resource information identification area, and uploading the first non-reference resource paths to the path identification area of the resource operation interface based on the arrangement sequence and the first non-reference identification codes to obtain a first interface to be output; the first interface to be output is delivered to a management end of the CocosCreator; acquiring a first instruction feedback condition of the management end on the first interface to be output; setting the resource cleaning requirement based on the first instruction feedback condition;
the second cleaning requirement acquiring step includes: acquiring a second picture resource file matched with the second non-reference identification code in the CocosCreator; firstly, uploading the second picture resource file in the resource information identification area of the resource operation interface, and then uploading the second non-reference resource path in the path identification area of the resource operation interface to obtain a second interface to be output; the second interface to be output is released to the management end; acquiring a second instruction feedback condition of the management end for the second interface to be output; and setting the resource clearing requirement based on the second instruction feedback condition.
As an improvement, the first instruction feedback condition includes: a first case, a second case, and a third case; the first condition is that a first resource deleting instruction with specified identification code information exists; the second condition is that a second resource deleting instruction without the specified identification code information exists; the third condition is that a first non-deleting operation instruction exists;
the second instruction feedback condition comprises: a fourth case and a fifth case; the fourth condition is that a third resource deleting instruction exists; the fifth condition is that a second non-delete operation instruction exists;
the resource cleanup needs include: a first demand, a second demand, and a third demand; the first requirement is a specified resource permission cleaning requirement; the second requirement is a total resource permission cleaning requirement; the third requirement is a resource unlicensed cleaning requirement;
the step of setting the resource clearing requirement based on the first instruction feedback condition further comprises: identifying the first instruction feedback condition; if the first instruction feedback condition is the first condition, setting the first non-reference identification code corresponding to the appointed identification code information as a first resource identification code to be deleted; setting the first unreferenced resource path corresponding to the first to-be-deleted resource identifier as a first to-be-deleted resource path; setting the resource cleaning requirement as the first requirement, and integrating the first to-be-deleted resource path into text information of the first requirement; if the first instruction feedback condition is the second condition, setting the resource cleaning requirement as the second requirement; if the first instruction feedback condition is the third condition, setting the resource cleaning requirement as the third requirement;
the step of setting the resource clearing requirement based on the second instruction feedback condition further comprises: identifying the second instruction feedback condition; if the second instruction feedback condition is the fourth condition, setting the resource cleaning requirement as the second requirement; and if the second instruction feedback condition is the fifth condition, setting the resource cleaning requirement as the third requirement.
As an improved solution, the resource cleaning operation includes:
identifying the resource cleanup needs;
calling a resource management interface of the CocosCreator to execute a resource deleting step based on the first to-be-deleted resource path when the resource cleaning requirement is the first requirement; the resource deleting step comprises: accessing a first picture resource storage area corresponding to the first resource path to be deleted, deleting a first picture resource file in the first picture resource storage area, and sending first cleaning notification information to the management terminal;
calling a resource management interface of the CocosCreator to execute the resource deleting step based on the second non-reference resource path or a plurality of first non-reference resource paths when the resource cleaning requirement is the second requirement;
and calling a resource management interface of the CocosCreator to close the first interface to be output or the second interface to be output of the management end when the resource cleaning requirement is the third requirement.
The invention also provides a system for cleaning picture resources in a game development engine, which comprises:
the system comprises a reference file screening module, a resource array generating module and a useless resource cleaning module;
the reference file screening module is used for setting a first keyword and accessing a CocosCreator; the reference file screening module acquires a first project file in the CocosCreator, and the reference file screening module sets a picture reference file based on the first keyword and the first project file;
the resource array generating module is used for accessing the method package in the CocosCreator, and the resource array generating module executes array construction operation based on the picture reference file and the method package to obtain a non-reference resource array;
the useless resource cleaning module is used for configuring a resource operation interface, acquiring a resource cleaning requirement based on the non-reference resource array and the resource operation interface, and executing a resource cleaning operation based on the resource cleaning requirement.
The invention also provides a computer readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the method for clearing picture resources in the game development engine.
The invention has the beneficial effects that:
1. the method for cleaning the picture resources in the game development engine can avoid the situation that a developer manually searches the picture reference relation in the CocosCreator, automatically screens and displays the picture resources which are not referenced in the CocosCreator, intelligently performs specified cleaning on the picture resources which are not referenced according to management requirements, has extremely high cleaning efficiency and cleaning accuracy, makes up the defects of the prior art, improves the maintainability of the CocosCreator, reduces the resource occupation, and has certain market value and application value.
2. The system for clearing the picture resources in the game development engine can avoid that developers manually search the picture reference relation in the CocosCreator and automatically screen and display the picture resources which are not referenced in the CocosCreator through the mutual matching of the reference file screening module, the resource array generating module and the useless resource clearing module, intelligently appoints and clears the non-referenced picture resources according to the management requirements, is high in clearing efficiency and clearing accuracy, overcomes the defects of the prior art, improves the maintainability of the CocosCreator, reduces the resource occupation, and has certain market value and application value.
3. The computer-readable storage medium can realize the cooperation of the guide reference file screening module, the resource array generating module and the useless resource cleaning module, further realize the automatic screening and display of the picture resources without reference in the CocosCreator, intelligently perform designated cleaning on the picture resources without reference according to the management requirement, has extremely high cleaning efficiency and cleaning precision, improves the maintainability of the CocosCreator, reduces the resource occupation, and effectively improves the operability of the method for cleaning the picture resources in the game development engine.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart of a method for clearing picture resources in a game development engine according to embodiment 1 of the present invention;
fig. 2 is a schematic specific flowchart of a method for clearing picture resources in a game development engine according to embodiment 1 of the present invention;
fig. 3 is an architecture diagram of a system for clearing picture resources in a game development engine according to embodiment 2 of the present invention.
Detailed Description
The following detailed description of the preferred embodiments of the present invention, taken in conjunction with the accompanying drawings, will make the advantages and features of the invention easier to understand by those skilled in the art, and thus will clearly and clearly define the scope of the invention.
In the description of the present invention, it should be noted that the described embodiments of the present invention are a part of the embodiments of the present invention, and not all embodiments; all other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "first", "second", "third", "fourth" and "fifth" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that the method for clearing picture resources in a game development engine described in embodiment 1 is suitable for deleting useless resources in the cocos creator.
In the description of the present invention, it is to be noted that: cocos creator is a game development engine/editor under the Cocos platform; spine is a lightweight framework.
Example 1
The embodiment provides a method for clearing picture resources in a game development engine, as shown in fig. 1 and fig. 2, the method includes the following steps:
s100, a step of screening the reference file, which specifically comprises the following steps:
s110, setting a first keyword, and accessing a CocosCreator; acquiring a first project file in the CocosCreator; setting a picture reference file based on the first keyword and the first project file; in this embodiment, the main purpose of step S100 is to determine various project files that may refer to the picture resource in the cocosverator;
specifically, the first project file comprises a plurality of resource reference files, and the resource reference files are all project files or functional files applied to the game development project of the Cocoscreator; in this embodiment, the picture reference files obtained through screening include a prefabricated body file, a scene file, a frame animation file, a keel animation file, a Spine animation file, an artistic word font file and a bitmap font file, and each file is a file which is most likely to reference picture resources in the development process of the cocos creator game;
specifically, a plurality of second keywords respectively corresponding to a plurality of resource reference files are identified; correspondingly, in the CocosCreator, the keyword corresponding to the prefabricated body file is Prafab, the keyword corresponding to the Scene file is Scene, the keyword corresponding to the frame animation file is animation-clip, the keyword corresponding to the keel animation file is dragonbones, the keyword corresponding to the Spine animation file is Spine, the keyword corresponding to the artistic word body file is label-atlas, and the keyword corresponding to the bitmap font file is bitmap-font; in order to improve the accuracy and the processing efficiency of the resource screening and deleting of the method, a screening algorithm is called to screen the second keywords matched with the first keywords from a plurality of second keywords; in this embodiment, the first keyword is "Prafab/Scene/animation-clip/dragonbones/spine/label-atlas/bitmap-font", and correspondingly, the first keyword is specifically set according to the specific situation of game development, and other character strings can be added to the first keyword through separation of "/" and meanwhile, a plurality of character strings separated by the "/" in the first keyword can be deleted; correspondingly, the screened second keyword is set as a third keyword, and the third keyword is: "Praffb", "Scene", "animation-clip", "dragonbones", "spine", "label-atlas" and "bitmap-font"; and setting the resource reference file corresponding to the third key as the picture reference file.
S200, a resource array generating step, which specifically comprises the following steps:
s210, accessing a method package in the CocosCreator, and executing array construction operation based on the picture reference file and the method package to obtain a non-reference resource array; since the picture resources exist in a distributed manner in the coco creator, the main purpose of step S200 is to confirm the reference relationship of all the picture resources in the coco creator based on the picture reference file obtained in step S100, and finally obtain an array of related structure or attribute information of the unreferenced picture resources that are not referenced; finally, deleting and cleaning the non-reference picture resources according to the number group;
specifically, the method package is configured with a resource information query method; in this embodiment, the resource information query method is provided by the cocosverator, and the resource information query method is the queryaassets method;
specifically, the array construction operation includes: creating a first array, a second array and a third array; the first array, the second array and the third array are all null arrays; in this embodiment, the resource information of the reference pictures in different picture reference files is different, and the file structures of the picture reference files are analyzed to find that the file structures of the prefabricated file and the scene file are basically consistent, the file structures of the keel animation file and the Spine animation file are basically consistent, and the file structures of the artistic word font file and the bitmap font file are basically consistent; correspondingly, picture resource information corresponding to picture reference files with different file structures is set, and the resource information is screened synchronously, so that the screening efficiency of resources is improved, and the screening accuracy is ensured; setting first picture resource information, second picture resource information and third picture resource information; the first picture resource information corresponds to the prefabricated body file and the scene file, and the second picture resource information corresponds to the keel animation file and the Spine animation file; in this embodiment, the frame animation file also adopts the second picture resource information to perform resource information screening; the third picture resource information corresponds to the artistic word font file and the bitmap font file; therefore, the following steps are respectively executed: calling the resource information query method to respectively query whether first reference resource information matched with the first picture resource information exists in the prefabricated body file and the scene file; if the first reference resource information exists, the first reference resource information is related to the picture resource referenced by the prefabricated body file or the scene file, and therefore the first reference resource information is added to the first array to obtain a first resource reference array; calling the resource information query method to query whether second reference resource information matched with the second picture resource information exists in the frame animation file, the keel animation file and the Spine animation file; if the second reference resource information exists, the second reference resource information is related information of the picture resource referenced by the frame animation file, the keel animation file or the Spine animation file, so that the second reference resource information is added to the second array to obtain a second resource reference array; calling the resource information query method to query whether third reference resource information matched with the third picture resource information exists in the artistic word font file and the bitmap font file; if the third reference resource information exists, the third reference resource information is related to the picture resources referenced by the artistic word font file and the bitmap font file, so that the third reference resource information is added to the third array to obtain a third resource reference array; and finally, traversing all picture resource information of the CocosCreator, and performing confirmation screening of the reference relationship, so that a resource reference confirmation operation is performed based on the resource information query method, the first resource reference array, the second resource reference array and the third resource reference array to obtain the non-reference resource array.
Specifically, the resource reference confirmation operation includes: calling the resource information query method to traverse a plurality of picture resources to be screened used in the Cocoscreator, wherein the picture resources to be screened are all picture resources generated/used in the game development process of the Cocoscreator; creating a fourth array, wherein the fourth array is also a null array, and in the embodiment, creating a plurality of null arrays, and storing and integrating information through the arrays, so that the processing efficiency is improved, and the accuracy and the independence of information processing are improved; therefore, a plurality of resource path information and a plurality of resource identifier information which are respectively matched with a plurality of picture resources to be screened are obtained from the coco creator, the resource path information is a storage-related path set by the picture resources to be screened in the development process of a coco creator game, the path can be a storage-related path of the coco creator or a storage-related data path in equipment applied by the coco creator, and in this embodiment, the resource path information is specifically associated with the picture resources to be screened to be obtained; the resource identification code information is uuid corresponding to the picture resource to be screened; correspondingly, in the operation, the resource path information is convenient to apply in the subsequent steps, and the resource identifier information is used for the subsequent reference relation confirmation, so that the array to be screened is obtained by only putting a plurality of resource identifier information into the fourth array, and the screening efficiency is further improved;
correspondingly, when the reference relationship is confirmed, first identifying first identification code information in the first referenced resource information in the first resource reference array, identifying second identification code information in the second referenced resource information in the second resource reference array, and identifying third identification code information in the third referenced resource information in the third resource reference array; confirming the reference relation of the picture resources based on the identification code information; therefore, whether resource identification code information which is not matched with the first identification code information, the second identification code information and the third identification code information exists in the array to be screened or not is judged, if yes, it is shown that picture resources corresponding to the resource identification code information are not quoted by a prefabricated body file, a scene file, a frame animation file, a keel animation file, a Spine animation file, an artistic word font file and a bitmap font file, and belong to non-quoted useless picture resources and can be deleted, and therefore the resource identification code information is set to be non-quoted resource identification codes; at this time, a fifth array is created, the fifth array is also a null array, and first path information matched with the non-reference resource identifier is confirmed in the plurality of resource path information; importing the non-reference resource identification code and the first path information into the fifth array to obtain the non-reference resource array; correspondingly, through the step, the relevant information of the non-reference picture resources which are not referenced in all the picture resources, such as the prefabricated body file, the scene file, the frame animation file, the keel animation file, the Spine animation file, the artistic word font file and the bitmap font file, is confirmed, and then the key array in the subsequent cleaning step is generated: a non-referenced resource array; correspondingly, in this embodiment, because the screening conditions are different, a plurality of unreferenced resource identifiers and a plurality of first path information may exist in the unreferenced resource array; therefore, the subsequent cleaning step needs to clean resources with different requirements according to specific conditions;
correspondingly, part of the core JavaScript implementation codes in step S200 are as follows:
// query referencing
Promise.all([
new Promise((ok, no) => {
Editor.log('query prefabs start...');
// prefab and scene file structures are substantially identical
// query preform and scene resources
Editor.assetdb.queryAssets('db://assets/**\/*', ['prefab', 'scene'], (err, results) => {
Editor.log('query prefabs finish...');
if (err) {
Editor.log(err);
return no && no();
}
this.prefabs = results || [];
ok && ok();
});
}),
I/Inquiry spine and Keel resources
new Promise((ok, no) => {
Editor.log('query spines start...');
Editor.assetdb.queryAssets('db://assets/**\/*', ['spine', 'dragonbones-atlas'], (err, results) => {
Editor.log('query spines finish...');
if (err) {
Editor.log(err);
return no && no();
}
this.spines = results || [];
ok && ok();
});
}),
I/Inquiry resources of artistic word fonts and bitmap fonts
new Promise((ok, no) => {
Editor.log('query fonts start...');
Editor.assetdb.queryAssets('db://assets/**\/*', ['label-atlas', 'bitmap-font'], (err, results) => {
Editor.log('query fonts finish...');
if (err) {
Editor.log(err);
return no && no();
}
this.fnts = results || [];
ok && ok();
});
})
]).then((ok, no) => {
// traverse pictures, query references
results.forEach(result => {
this.doneResCnt++;
this.loadertips =' is looking for a reference. $ { this.donerecnt }/$ { this.totalresecnt } ";
if (this.checkIsExcludeUrl(result.url)) return;
let uuid = result.uuid;
let url = result.url;
if (!this.queryUsageInPrefabOrScene(uuid) &&
!this.queryUsageInClip(uuid) &&
!this.queryUsageInSpine(url) &&
!this.queryUsageInFnt(url)) {
this.unuseSpriteFrame.push(result);
} else {
this.usedSpriteFrame.push(result);
}
});
this.onQueryFinish();
this.isProcessing = false;
this.loaderTips = '';
} catch (error) {
no && no();
}
});
}).catch(() => {
log ('query failure');
this.isProcessing = false;
});
// query for references to pictures in the pre-form and scene from uuid
queryUsageInPrefabOrScene(uuid) {
for (let i = 0; i < this.prefabs.length; i++) {
if (this.queryUsageInSinglePrefabOrScene(uuid, this.prefabs[i])) return true;
}
return false;
},
V/query for references to pictures in sequence frame animation according to uuid
queryUsageInClip(uuid) {
for (let i = 0; i < this.clips.length; i++) {
if (this.queryUsageInSingleClip(uuid, this.clips[i])) return true;
}
return false;
},
I/Inquiry reference of pictures in spine and keel animation according to uuid
queryUsageInSpine(url) {
let textureUuid = this.getTextureBySubAssetUrl(url).uuid;
for (let i = 0; i < this.spines.length; i++) {
const meta = this.parseJsonByPath(this.spines[i].path + '.meta');
// dragonbones
if (meta.texture == textureUuid) return true;
// spine
if (meta.textures && meta.textures.indexOf(textureUuid) >= 0) return true;
}
return false;
},
I/Inquiry reference of pictures in fonts according to uuid
queryUsageInFnt(url) {
let textureUuid = this.getTextureBySubAssetUrl(url).uuid;
for (let i = 0; i < this.fnts.length; i++) {
const meta = this.parseJsonByPath(this.fnts[i].path + '.meta');
// rawTextureUuid for label-atlas, textureUuid for fnt
if (meta.rawTextureUuid == textureUuid || meta.textureUuid == textureUuid) return true;
}
return false;
},
S300, a useless resource cleaning step specifically comprises:
s310, configuring a resource operation interface, acquiring a resource cleaning requirement based on the non-reference resource array and the resource operation interface, and executing a resource cleaning operation based on the resource cleaning requirement; in this embodiment, the resource operation interface is mainly a window interface used in the intelligent processing device; correspondingly, the main configuration purpose of the resource operation interface is to visually display the non-reference picture resource information to the management end/user end of the CocosCreator, so that the non-reference picture resource can be subjected to specified/non-specified cleaning operation according to the specific requirements of the management end/user end;
specifically, a path identification area and a resource information identification area are configured in the resource operation interface; in this embodiment, both the path identifier area and the resource information identifier area are displayed in a list form, and the two areas are respectively used for displaying corresponding picture resources and resource paths to the management terminal;
specifically, a first number threshold is set, and in the present embodiment, the first number threshold is set to be 2; counting a second number of the non-reference resource identifiers in the array of non-reference resources; comparing whether the second quantity reaches the first quantity threshold value;
if the number of the non-reference resource identifiers in the non-reference resource array reaches the preset number, indicating that a plurality of non-reference resource identifiers exist in the non-reference resource array, and needing to be accurately cleaned according to the selection of a management terminal, so that the non-reference resource identifiers in the non-reference resource array are judged to comprise a plurality of first non-reference identifiers, and the first path information in the non-reference resource array is judged to comprise a plurality of first non-reference resource paths respectively matched with the first non-reference identifiers; in this embodiment, several means are at least two; so that a first cleaning requirement obtaining step is executed based on a plurality of the first non-reference identification codes and a plurality of the first non-reference resource paths;
if not, the non-reference resource array only has one non-reference resource identification code, so that only a cleaning decision of the management end on the picture resource needs to be obtained, namely cleaning or non-cleaning; therefore, the non-reference resource identifier in the non-reference resource array is judged to be a second non-reference identifier, and the first path information in the non-reference resource array is judged to be a second non-reference resource path; executing a second cleaning requirement obtaining step based on the second non-reference identification code and the second non-reference resource path; in this embodiment, the number of the second non-reference identification code and the number of the second non-reference resource path are only one; the first non-reference identification code and the first non-reference resource path are respectively provided with a plurality of codes; therefore, the first cleaning requirement obtaining step and the second cleaning step are different requirement obtaining steps adopted according to different conditions, the applicability of the method is improved, and the experience of operators is improved;
specifically, the first cleaning requirement obtaining step includes: acquiring a plurality of first picture resource files respectively matched with the first non-reference identification codes in the CocosCreator, wherein the first picture resource files are acquired based on a plurality of first non-reference resource paths respectively corresponding to the first non-reference identification codes; uploading a plurality of first picture resource files in the resource information identification area of the resource operation interface; identifying the arrangement sequence of the plurality of first picture resource files in the resource information identification area, sequentially uploading the plurality of first non-reference resource paths to the path identification area of the resource operation interface according to the arrangement sequence of the plurality of first picture resource files and taking a plurality of first non-reference identification codes respectively corresponding to the plurality of first picture resource files as an index basis, so as to obtain a first interface to be output, and finally presenting a list form respectively corresponding to the plurality of first picture resource files and the plurality of first non-reference resource paths in the resource information identification area and the path identification area of the first interface to be output; the first interface to be output is delivered to a management end of the CocosCreator; acquiring a first instruction feedback condition of the management end on the first interface to be output, wherein the first instruction feedback condition is an operation instruction fed back by the management end on the basis of the first interface to be output; setting the resource cleaning requirement based on the first instruction feedback condition;
the principle of the second cleaning requirement obtaining step is similar to that of the first cleaning requirement obtaining step, and the second cleaning requirement obtaining step specifically comprises the following steps: acquiring a second picture resource file matched with the second non-reference identification code in the CocosCreator; the second non-reference identification code, the second picture resource file and the second non-reference resource path are only one respectively, so that the second non-reference identification code, the second picture resource file and the second non-reference resource path are directly uploaded to corresponding areas, the second picture resource file is uploaded in the resource information identification area of the resource operation interface at first, and then the second non-reference resource path is uploaded in the path identification area of the resource operation interface to obtain a second interface to be output; the second interface to be output is released to the management end; acquiring a second instruction feedback condition of the management end for the second interface to be output, wherein the second instruction feedback condition is an operation instruction fed back by the management end based on the second interface to be output; setting the resource clearing requirement based on the second instruction feedback condition; through the steps, the confirmation of the management end on the related requirements of resource cleaning is completed, and finally, the accurate and error-free resource cleaning operation is carried out according to the resource cleaning requirements;
specifically, the first instruction feedback condition includes: a first case, a second case, and a third case; the first condition is that a first resource deleting instruction with specified identification code information fed back by the management terminal exists, and the corresponding picture resource needs to be deleted and cleaned according to the requirement; the second condition is that a second resource deleting instruction without the specified identification code information fed back by the management terminal exists, so that all non-reference picture resources need to be cleaned; the third condition is that a first non-deletion operation instruction fed back by the management end exists, so that the unreferenced resource does not need to be cleaned and any operation does not need to be carried out;
specifically, the second instruction feedback condition includes: a fourth case and a fifth case; the fourth condition is that a third resource deleting instruction fed back by the management end exists, so that all non-reference picture resources need to be cleaned; the fifth condition is that a second non-deletion operation instruction fed back by the management end exists, so that the non-reference picture resource does not need to be cleaned and any operation does not need to be carried out;
specifically, the resource cleaning requirement is generated according to the above situation, and the resource cleaning requirement includes: a first demand, a second demand, and a third demand; the first requirement is a specified resource permission cleaning requirement, namely a picture resource corresponding to the specified deletion cleaning is designated according to the requirement; the second requirement is a total resource permission cleaning requirement, namely cleaning all non-reference picture resources; the third requirement is a resource non-permission cleaning requirement, namely, the non-reference picture resource is not cleaned;
specifically, based on the above definition, the step of setting the resource clearing requirement based on the first instruction feedback condition in this step further includes: identifying the first instruction feedback condition; if the first instruction feedback condition is the first condition, setting the first non-reference identification code corresponding to the appointed identification code information as a first resource identification code to be deleted; setting the first unreferenced resource path corresponding to the first to-be-deleted resource identifier as a first to-be-deleted resource path; setting the resource cleaning requirement as the first requirement, and integrating the first to-be-deleted resource path into text information of the first requirement, wherein the text information is a text packet of the resource cleaning requirement which can be identified by a main body for resource cleaning; if the first instruction feedback condition is the second condition, setting the resource cleaning requirement as the second requirement; if the first instruction feedback condition is the third condition, setting the resource cleaning requirement as the third requirement;
specifically, based on the above definition, the step of setting the resource cleaning requirement based on the second instruction feedback condition in this step further includes: identifying the second instruction feedback condition; if the second instruction feedback condition is the fourth condition, setting the resource cleaning requirement as the second requirement; and if the second instruction feedback condition is the fifth condition, setting the resource cleaning requirement as the third requirement.
Correspondingly, after the specific resource cleaning requirement is obtained, the corresponding resource cleaning operation can be executed; specifically, the resource cleaning operation includes: identifying the resource cleanup needs; calling a resource management interface of the CocosCreator to perform specified cleaning when the resource cleaning requirement is the first requirement, so that a resource deleting step is executed based on the first to-be-deleted resource path; the resource deleting step comprises: accessing a first picture resource storage area corresponding to the first resource path to be deleted in the coco creator or a device applied by the coco creator, deleting a first picture resource file (i.e., a picture resource file which is not applied and is specified to be deleted by a management end and corresponds to the first resource identifier to be deleted) in the first picture resource storage area, and sending first cleaning notification information to the management end; the first cleaning notification information includes, but is not limited to, "cleaning completed" and the like in the present embodiment; correspondingly, after the related operations of designated cleaning are executed, the cleaned first picture resource file and the first non-reference resource path need to be removed from the first interface to be output of the management end, so that the updating of the first interface to be output is realized, and the experience of operators is improved; calling a resource management interface of the CocosCreator to perform all cleaning when the resource cleaning requirement is the second requirement, so that the resource deleting step is performed based on the second non-reference resource path or a plurality of first non-reference resource paths; calling a resource management interface of the CocosCreator to not perform resource cleaning when the resource cleaning requirement is the third requirement, so that in order to improve the experience of operators, judging that the resource cleaning is not required at present, and closing the first interface to be output or the second interface to be output of the management end;
specifically, the step of executing the resource deleting step based on the second unreferenced resource path or the plurality of first unreferenced resource paths further includes:
the method is divided into two cases: a first case where, in the case where the second number reaches the first number threshold, the result is necessarily a number of the first unreferenced resource paths; therefore, accessing a plurality of second picture resource storage areas corresponding to a plurality of first non-reference resource paths in the CocosCreator or in equipment applied by the CocosCreator, deleting a plurality of second picture resource files corresponding to the plurality of second picture resource storage areas, and sending the first cleaning notification information to the management terminal; in a second case, in a case where the second number does not reach the first number threshold, a second unreferenced resource path is necessarily obtained; therefore, accessing a third picture resource storage area corresponding to the second non-reference resource path in the coco creator or in the device applied by the coco creator, deleting a third picture resource file in the third picture resource storage area, and sending the first cleaning notification information to the management terminal;
correspondingly, part of the core JavaScript implementation codes in step S300 are as follows:
// delete specifies a picture resource without reference
deleteOnRes(url) {
Editor.assetdb.delete([this.getTextureBySubAssetUrl(url).url]);
},
// delete all non-referenced picture resources
deleteAllRes() {
const urls = [];
this.unuseSpriteFrame.forEach(frame => {
urls.push(this.getTextureBySubAssetUrl(frame.url).url);
});
Editor.assetdb.delete(urls);
},
Update resource list in interface after deleting picture
updateListAfterDelete(urls) {
for (let i = 0; i < urls.length; i++) {
for (let j = this.unuseSpriteFrame.length - 1; j >= 0; j--) {
if (urls[i].path == this.unuseSpriteFrame[j].path) {
this.unuseSpriteFrame.splice(j, 1);
break;
}
}
}
this.spriteFrames = this.unuseSpriteFrame.concat();
}
Correspondingly, by the method for cleaning the picture resources in the game development engine, the situation that a developer manually searches for the picture reference relationship in the CocosCreator is avoided, the picture resources which are not referenced in the CocosCreator are screened and displayed automatically, the picture resources which are not referenced in the CocosCreator are intelligently and specifically cleaned according to management requirements, the cleaning efficiency and the cleaning accuracy are extremely high, the defects of the prior art are overcome, the maintainability of the CocosCreator is improved, the resource occupation is reduced, and certain market value and application value are achieved.
Example 2
The present embodiment provides a system for clearing picture resources in a game development engine based on the same inventive concept as the method for clearing picture resources in a game development engine described in embodiment 1, as shown in fig. 3, the system includes: the system comprises a reference file screening module, a resource array generating module and a useless resource cleaning module;
in the system for cleaning picture resources in the game development engine, a reference file screening module is used for setting a first keyword and accessing a CocosCreator; the reference file screening module acquires a first project file in the CocosCreator, and the reference file screening module sets a picture reference file based on the first keyword and the first project file;
specifically, the first project file comprises a plurality of resource reference files; the picture reference files comprise a prefabricated body file, a scene file, a frame animation file, a keel animation file, a Spine animation file, an artistic word font file and a bitmap font file;
specifically, the reference file screening module identifies a plurality of second keywords respectively corresponding to a plurality of resource reference files; a reference file screening module calls a screening algorithm to screen out the second keywords matched with the first keywords from the second keywords; the reference file screening module sets the screened second keyword as a third keyword; and the reference file screening module sets the resource reference file corresponding to the third key word as the picture reference file.
In the system for clearing picture resources in the game development engine, a resource array generating module is used for accessing a method package in the Cocoscreator, and the resource array generating module executes array construction operation based on the picture reference file and the method package to obtain a non-reference resource array;
specifically, the method package is configured with a resource information query method;
specifically, the array construction operation includes: the resource array generating module creates a first array, a second array and a third array; the resource array generating module is used for setting first picture resource information, second picture resource information and third picture resource information; a resource array generating module calls the resource information query method to respectively query whether first reference resource information matched with the first picture resource information exists in the prefabricated body file and the scene file; if the first reference resource information exists, the resource array generating module adds the first reference resource information to the first array to obtain a first resource reference array; a resource array generating module calls the resource information query method to query whether second quote resource information matched with the second picture resource information exists in the frame animation file, the keel animation file and the Spine animation file; if the second reference resource information exists, the resource array generating module adds the second reference resource information to the second array to obtain a second resource reference array; a resource array generating module calls the resource information query method to query whether third reference resource information matched with the third picture resource information exists in the artistic word font file and the bitmap font file or not; if the third referenced resource exists, the resource array generating module adds the third referenced resource information to the third array to obtain a third resource reference array; the resource array generating module executes resource reference confirmation operation based on the resource information query method, the first resource reference array, the second resource reference array and the third resource reference array to obtain the non-reference resource array;
specifically, the resource reference confirmation operation includes: a resource array generating module calls the resource information query method to traverse a plurality of picture resources to be screened used in the CocosCreator; a resource array generating module creates a fourth array, and acquires a plurality of resource path information and a plurality of resource identification code information which are respectively matched with a plurality of picture resources to be screened from the Cocoscreator; the resource array generating module is used for placing a plurality of pieces of resource identification code information into the fourth array to obtain an array to be screened; the resource array generating module identifies first identification code information in the first reference resource information in the first resource reference array; the resource array generating module identifies second identification code information in the second reference resource information in the second resource reference array; the resource array generating module identifies third identification code information in the third reference resource information in the third resource reference array; the resource array generation module judges whether the resource identifier information which is not matched with the first identifier information, the second identifier information and the third identifier information exists in the array to be screened, if so, the resource array generation module sets the resource identifier information as a non-reference resource identifier; a resource array generating module creates a fifth array, and the resource array generating module confirms first path information matched with the non-reference resource identification code in a plurality of pieces of resource path information; the resource array generation module imports the non-reference resource identification code and the first path information into the fifth array to obtain the non-reference resource array;
specifically, the resource array generation module sets a first quantity threshold value, and counts a second quantity of the non-reference resource identifiers in the non-reference resource array; the resource array generating module compares whether the second quantity reaches the first quantity threshold value; if the number of the non-reference resource identifiers is up, the resource array generation module judges that the non-reference resource identifiers in the non-reference resource array comprise a plurality of first non-reference identifiers, and the resource array generation module judges that the first path information in the non-reference resource array comprises a plurality of first non-reference resource paths respectively matched with the first non-reference identifiers; the resource array generating module executes a first cleaning requirement obtaining step based on the first non-reference identification codes and the first non-reference resource paths;
specifically, if the result does not reach the preset value, the resource array generation module judges that the non-reference resource identifier in the non-reference resource array is a second non-reference identifier, and the resource array generation module judges that the first path information in the non-reference resource array is a second non-reference resource path; and the resource array generating module executes a second cleaning requirement obtaining step based on the second non-reference identification code and the second non-reference resource path.
Specifically, the first cleaning requirement obtaining step includes: a resource array generating module acquires a plurality of first picture resource files respectively matched with the first non-reference identification codes in the CocosCreator; a resource array generation module uploads a plurality of first picture resource files in the resource information identification area of the resource operation interface; a resource array generating module identifies the arrangement sequence of the first picture resource files in the resource information identification area, and uploads a plurality of first non-reference resource paths to the path identification area of the resource operation interface based on the arrangement sequence and the first non-reference identification codes to obtain a first interface to be output; the resource array generating module puts the first interface to be output to a management end of the CocosCreator; the resource array generating module acquires a first instruction feedback condition of the management end on the first interface to be output; the resource array generating module sets the resource cleaning requirement based on the first instruction feedback condition;
specifically, the second cleaning requirement obtaining step includes: the resource array generating module acquires a second picture resource file matched with the second non-reference identification code in the CocosCreator; the resource array generation module uploads the second picture resource file in the resource information identification area of the resource operation interface, and then the resource array generation module uploads the second non-reference resource path in the path identification area of the resource operation interface to obtain a second interface to be output; the resource array generating module puts the second interface to be output to the management end; the resource array generating module acquires a second instruction feedback condition of the management end to the second interface to be output; and the resource array generating module sets the resource cleaning requirement based on the second instruction feedback condition.
Specifically, the first instruction feedback condition includes: a first case, a second case, and a third case; the first condition is that a first resource deleting instruction with specified identification code information exists; the second condition is that a second resource deleting instruction without the specified identification code information exists; the third condition is that a first non-deleting operation instruction exists; the second instruction feedback condition comprises: a fourth case and a fifth case; the fourth condition is that a third resource deleting instruction exists; the fifth condition is that a second non-delete operation instruction exists; the resource cleanup needs include: a first demand, a second demand, and a third demand; the first requirement is a specified resource permission cleaning requirement; the second requirement is a total resource permission cleaning requirement; the third requirement is a resource unlicensed cleaning requirement;
specifically, the operation of the resource array generation module setting the resource cleaning requirement based on the first instruction feedback condition further includes: the resource array generating module identifies the first instruction feedback condition; if the first instruction feedback condition is the first condition, the resource array generation module sets the first non-reference identification code corresponding to the designated identification code information as a first resource identification code to be deleted; the resource array generation module sets the first unreferenced resource path corresponding to the first to-be-deleted resource identifier as a first to-be-deleted resource path; the resource array generation module sets the resource cleaning requirement as the first requirement and integrates the first resource path to be deleted into the text message of the first requirement; if the first instruction feedback condition is the second condition, the resource array generation module sets the resource cleaning requirement as the second requirement; if the first instruction feedback condition is the third condition, the resource array generation module sets the resource cleaning requirement as the third requirement;
specifically, the operation of the resource array generation module setting the resource cleaning requirement based on the second instruction feedback condition further includes: the resource array generating module identifies the second instruction feedback condition; if the second instruction feedback condition is the fourth condition, the resource array generation module sets the resource cleaning requirement as the second requirement; and if the second instruction feedback condition is the fifth condition, the resource array generation module sets the resource cleaning requirement to be the third requirement.
In the system for clearing picture resources in the game development engine, a useless resource clearing module is used for configuring a resource operation interface, the useless resource clearing module acquires a resource clearing requirement based on the non-reference resource array and the resource operation interface, and the useless resource clearing module executes resource clearing operation based on the resource clearing requirement;
specifically, a path identification area and a resource information identification area are configured in the resource operation interface;
specifically, the resource cleaning operation includes: a garbage collection module identifies the resource collection requirement; a useless resource cleaning module calls a resource management interface of the CocosCreator to execute a resource deleting step based on the first to-be-deleted resource path when the resource cleaning requirement is the first requirement; the resource deleting step comprises: the useless resource cleaning module calls a resource management interface of the CocosCreator to access a first picture resource storage area corresponding to the first resource path to be deleted, the useless resource cleaning module calls the resource management interface of the CocosCreator to delete a first picture resource file in the first picture resource storage area, and the useless resource cleaning module calls the resource management interface of the CocosCreator to send first cleaning notification information to the management end; a useless resource cleaning module calls a resource management interface of the CocosCreator to execute the resource deleting step based on the second non-reference resource path or a plurality of first non-reference resource paths when the resource cleaning requirement is the second requirement; and the useless resource cleaning module calls a resource management interface of the CocosCreator to close the first interface to be output or the second interface to be output of the management end when the resource cleaning requirement is the third requirement.
Example 3
The present embodiments provide a computer-readable storage medium comprising:
the storage medium is used for storing computer software instructions for implementing the method for clearing picture resources in the game development engine described in embodiment 1, and the storage medium includes a program for executing the method for clearing picture resources in the game development engine; specifically, the executable program may be embedded in the system for clearing picture resources in the game development engine described in embodiment 2, so that the system for clearing picture resources in the game development engine may implement the method for clearing picture resources in the game development engine described in embodiment 1 by executing the embedded executable program.
Furthermore, the computer-readable storage medium of the present embodiments may take any combination of one or more readable storage media, where a readable storage medium includes an electronic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
Different from the prior art, the method, the system and the medium for clearing the picture resources in the game development engine can automatically screen and display the picture resources without reference in the CocosCreator, intelligently and specifically clear the picture resources without reference according to the management requirement, the clearing efficiency and the clearing precision are extremely high, effective technical support is provided for the method through the system, the defects of the prior art are finally overcome, the maintainability of the CocosCreator is improved, the resource occupation is reduced, and certain market value and application value are achieved.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, and a program that can be implemented by the hardware and can be instructed by the program to be executed by the relevant hardware may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic or optical disk, and the like.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for clearing picture resources in a game development engine is characterized by comprising the following steps:
screening the reference files:
setting a first keyword, and accessing a CocosCreator; acquiring a first project file in the CocosCreator; setting a picture reference file based on the first keyword and the first project file;
a resource array generating step:
accessing a method package in the CocosCreator, and executing array construction operation based on the picture reference file and the method package to obtain a non-reference resource array;
and a useless resource cleaning step:
and configuring a resource operation interface, acquiring a resource cleaning requirement based on the non-reference resource array and the resource operation interface, and executing resource cleaning operation based on the resource cleaning requirement.
2. The method for clearing picture resources in a game development engine according to claim 1, wherein:
the first project file comprises a plurality of resource reference files; the picture reference files comprise a prefabricated body file, a scene file, a frame animation file, a keel animation file, a Spine animation file, an artistic word font file and a bitmap font file;
the method packet is configured with a resource information query method; a path identification area and a resource information identification area are configured in the resource operation interface;
the step of setting a picture reference file based on the first keyword and the first project file further comprises: identifying a plurality of second keywords respectively corresponding to a plurality of resource reference files; calling a screening algorithm to screen out the second keywords matched with the first keywords from the second keywords; setting the screened second keyword as a third keyword; and setting the resource reference file corresponding to the third key as the picture reference file.
3. The method for clearing picture resources in a game development engine according to claim 2, wherein:
the array construction operation comprises:
creating a first array, a second array and a third array; setting first picture resource information, second picture resource information and third picture resource information;
calling the resource information query method to respectively query whether first reference resource information matched with the first picture resource information exists in the prefabricated body file and the scene file; if so, adding the first reference resource information to the first array to obtain a first resource reference array;
calling the resource information query method to query whether second reference resource information matched with the second picture resource information exists in the frame animation file, the keel animation file and the Spine animation file; if so, adding the second reference resource information to the second array to obtain a second resource reference array;
calling the resource information query method to query whether third reference resource information matched with the third picture resource information exists in the artistic word font file and the bitmap font file; if so, adding the third reference resource information to the third array to obtain a third resource reference array;
and executing resource reference confirmation operation based on the resource information query method, the first resource reference array, the second resource reference array and the third resource reference array to obtain the non-reference resource array.
4. The method for clearing picture resources in a game development engine according to claim 3, wherein:
the resource reference validation operation comprises:
calling the resource information query method to traverse a plurality of picture resources to be screened used in the CocosCreator; creating a fourth array, and acquiring a plurality of resource path information and a plurality of resource identification code information which are respectively matched with a plurality of picture resources to be screened from the Cocoscreator; placing a plurality of resource identification code information into the fourth array to obtain an array to be screened;
identifying first identification code information in the first referenced resource information in the first resource reference array; identifying second identification code information in the second referenced resource information in the second resource reference array; identifying third identifier information in the third referenced resource information in the third resource reference array;
judging whether the resource identifier information which is not matched with the first identifier information, the second identifier information and the third identifier information exists in the array to be screened, and if the resource identifier information exists, setting the resource identifier information as a non-reference resource identifier;
creating a fifth array, and confirming first path information matched with the non-reference resource identifier in a plurality of pieces of resource path information; and importing the non-reference resource identification code and the first path information into the fifth array to obtain the non-reference resource array.
5. The method of claim 4, wherein the method comprises the steps of:
the step of obtaining resource cleaning requirements based on the non-referenced resource array and the resource operation interface further comprises:
setting a first quantity threshold value, and counting a second quantity of the non-reference resource identifiers in the non-reference resource array; comparing whether the second quantity reaches the first quantity threshold value;
if so, judging that the non-reference resource identification codes in the non-reference resource array comprise a plurality of first non-reference identification codes, and judging that the first path information in the non-reference resource array comprises a plurality of first non-reference resource paths respectively matched with the first non-reference identification codes; executing a first cleaning requirement acquisition step based on a plurality of first non-reference identification codes and a plurality of first non-reference resource paths;
if not, judging that the non-reference resource identification code in the non-reference resource array is a second non-reference identification code, and judging that the first path information in the non-reference resource array is a second non-reference resource path; and executing a second cleaning requirement acquisition step based on the second non-reference identification code and the second non-reference resource path.
6. The method for clearing picture resources in a game development engine according to claim 5, wherein:
the first cleaning requirement acquiring step includes: acquiring a plurality of first picture resource files respectively matched with a plurality of first non-reference identification codes in the CocosCreator; uploading a plurality of first picture resource files in the resource information identification area of the resource operation interface; identifying the arrangement sequence of the first picture resource files in the resource information identification area, and uploading the first non-reference resource paths to the path identification area of the resource operation interface based on the arrangement sequence and the first non-reference identification codes to obtain a first interface to be output; the first interface to be output is delivered to a management end of the CocosCreator; acquiring a first instruction feedback condition of the management end on the first interface to be output; setting the resource cleaning requirement based on the first instruction feedback condition;
the second cleaning requirement acquiring step includes: acquiring a second picture resource file matched with the second non-reference identification code in the CocosCreator; firstly, uploading the second picture resource file in the resource information identification area of the resource operation interface, and then uploading the second non-reference resource path in the path identification area of the resource operation interface to obtain a second interface to be output; the second interface to be output is released to the management end; acquiring a second instruction feedback condition of the management end for the second interface to be output; and setting the resource clearing requirement based on the second instruction feedback condition.
7. The method for clearing picture resources in a game development engine according to claim 6, wherein:
the first instruction feedback condition comprises: a first case, a second case, and a third case; the first condition is that a first resource deleting instruction with specified identification code information exists; the second condition is that a second resource deleting instruction without the specified identification code information exists; the third condition is that a first non-deleting operation instruction exists;
the second instruction feedback condition comprises: a fourth case and a fifth case; the fourth condition is that a third resource deleting instruction exists; the fifth condition is that a second non-delete operation instruction exists;
the resource cleanup needs include: a first demand, a second demand, and a third demand; the first requirement is a specified resource permission cleaning requirement; the second requirement is a total resource permission cleaning requirement; the third requirement is a resource unlicensed cleaning requirement;
the step of setting the resource clearing requirement based on the first instruction feedback condition further comprises: identifying the first instruction feedback condition; if the first instruction feedback condition is the first condition, setting the first non-reference identification code corresponding to the appointed identification code information as a first resource identification code to be deleted; setting the first unreferenced resource path corresponding to the first to-be-deleted resource identifier as a first to-be-deleted resource path; setting the resource cleaning requirement as the first requirement, and integrating the first to-be-deleted resource path into text information of the first requirement; if the first instruction feedback condition is the second condition, setting the resource cleaning requirement as the second requirement; if the first instruction feedback condition is the third condition, setting the resource cleaning requirement as the third requirement;
the step of setting the resource clearing requirement based on the second instruction feedback condition further comprises: identifying the second instruction feedback condition; if the second instruction feedback condition is the fourth condition, setting the resource cleaning requirement as the second requirement; and if the second instruction feedback condition is the fifth condition, setting the resource cleaning requirement as the third requirement.
8. The method of claim 7, wherein the method comprises the steps of:
the resource cleaning operation comprises:
identifying the resource cleanup needs;
calling a resource management interface of the CocosCreator to execute a resource deleting step based on the first to-be-deleted resource path when the resource cleaning requirement is the first requirement; the resource deleting step comprises: accessing a first picture resource storage area corresponding to the first resource path to be deleted, deleting a first picture resource file in the first picture resource storage area, and sending first cleaning notification information to the management terminal;
calling a resource management interface of the CocosCreator to execute the resource deleting step based on the second non-reference resource path or a plurality of first non-reference resource paths when the resource cleaning requirement is the second requirement;
and calling a resource management interface of the CocosCreator to close the first interface to be output or the second interface to be output of the management end when the resource cleaning requirement is the third requirement.
9. The system for clearing picture resources in a game development engine based on the method for clearing picture resources in the game development engine as claimed in any one of claims 1 to 8, comprising: the system comprises a reference file screening module, a resource array generating module and a useless resource cleaning module;
the reference file screening module is used for setting a first keyword and accessing a CocosCreator; the reference file screening module acquires a first project file in the CocosCreator, and the reference file screening module sets a picture reference file based on the first keyword and the first project file;
the resource array generating module is used for accessing the method package in the CocosCreator, and the resource array generating module executes array construction operation based on the picture reference file and the method package to obtain a non-reference resource array;
the useless resource cleaning module is used for configuring a resource operation interface, acquiring a resource cleaning requirement based on the non-reference resource array and the resource operation interface, and executing a resource cleaning operation based on the resource cleaning requirement.
10. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of the method for clearing picture resources in a game development engine according to any one of claims 1 to 8.
CN202111626001.3A 2021-12-29 2021-12-29 Method, system and medium for clearing picture resources in game development engine Pending CN114259732A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111626001.3A CN114259732A (en) 2021-12-29 2021-12-29 Method, system and medium for clearing picture resources in game development engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111626001.3A CN114259732A (en) 2021-12-29 2021-12-29 Method, system and medium for clearing picture resources in game development engine

Publications (1)

Publication Number Publication Date
CN114259732A true CN114259732A (en) 2022-04-01

Family

ID=80830776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111626001.3A Pending CN114259732A (en) 2021-12-29 2021-12-29 Method, system and medium for clearing picture resources in game development engine

Country Status (1)

Country Link
CN (1) CN114259732A (en)

Similar Documents

Publication Publication Date Title
US8892504B2 (en) Method and system for reconciling meta-data in a data warehouse
CN106874764B (en) A method of Android application readjustment sequence is automatically generated based on call back function modeling
CN112148509A (en) Data processing method, device, server and computer readable storage medium
CN106873952B (en) Data processing system and method for mobile terminal webpage development and application device
CN107203574A (en) Data management and the polymerization of data analysis
CN113204571B (en) SQL execution method and device related to write-in operation and storage medium
CN114780485A (en) Electronic archive management method, system, readable storage medium and equipment
CN109063040B (en) Client program data acquisition method and system
CN113722518A (en) Storage method, retrieval method, equipment and medium based on remote sensing image metadata
CN114259732A (en) Method, system and medium for clearing picture resources in game development engine
CN116821098A (en) Data warehouse management method, service system and storage medium
CN116628215A (en) Data asset management method, control device and readable storage medium
CN115238655A (en) Json data editing method and device
CN112231518B (en) Method, system, electronic device and storage medium for discovering network propagation behavior of works
CN112002130B (en) Data management method, device, server and computer readable storage medium
CN115017161A (en) Method, device and application for updating tree data structure by combining virtual DOM
CN115098368A (en) Intelligent verification method and device for recognizing brain picture use case
CN114936269A (en) Document searching platform, searching method, device, electronic equipment and storage medium
CN110221952B (en) Service data processing method and device and service data processing system
EP0770963A2 (en) Structured data and document processing apparatus and method
CN113792026A (en) Deployment method and device of database script and computer readable storage medium
CN108255851B (en) Project data carding system and method
JPH09171510A (en) Structured data processor
JP3053288B2 (en) Communication terminal device
JP2001134424A (en) Method and device for preparing system parameter and computer readable storage medium recording system parameter preparation program and computer readable storage medium storing system parameter preparation data

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