Batch packaging and step-by-step loading system and method for assetbundle resources

By designing a batch packaging and step-by-step loading system for assetbundle resources, the problem of low resource loading efficiency in existing technologies is solved, achieving efficient resource management and fast loading, which is suitable for the 3D scene presentation of smart factories.

CN115357300BActive Publication Date: 2026-04-10BEIJING JUNHE CHUANGXIANG TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING JUNHE CHUANGXIANG TECH DEV CO LTD
Filing Date
2022-08-18
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing resource loading systems are independent and inefficient in the packaging and loading process, and cannot control the loading order, resulting in long processing times and making it difficult to meet the needs of rapid rendering of a large number of 3D scenes in smart factories.

Method used

A batch packaging and step-by-step loading system for assetbundle resources was designed. Through the original data layer, interactive data layer, and loading data layer, combined with the API of the graphical interface and custom editor, the system realizes parameter definition and relationship construction in the loading process of material data from the original resources to the actual scene. The system adopts JSON format configuration files and recursive loading method to ensure the sequential loading of materials and models.

Benefits of technology

It improves resource packaging efficiency, lowers the operational threshold, reduces loading waiting time, enhances system flexibility and overall production efficiency, and is suitable for resource management in smart factory scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115357300B_ABST
    Figure CN115357300B_ABST
Patent Text Reader

Abstract

The application discloses a kind of assetbundle resource batch packing and step-by-step loading system and method, the system includes: original data layer: the basic relationship of core data is described;Interaction data layer: from the perspective of graphical interface, the relationship of original data class is described;Loading data layer: from the perspective of loading process, the data after packing is completed is described;The system is completed through original data layer, interaction data layer and loading data layer to the parameter definition and relationship construction in the process that material data is loaded from original resource to AssetBundle resource again to the resource in actual scene.This system realizes the packing loading process of assetbundle resource by input module, packing module and loading module.The application improves the packing efficiency of resource by the close coupling of graphical packing operation interface, packing process and loading process.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a batch packaging and step-by-step loading system and method, in particular to a batch packaging and step-by-step loading system and method of assetbundle resources. BACKGROUND

[0002] WebGL content published by the engine can visualize three-dimensional scenes, but three-dimensional scenes often have many faces and fine materials. When WebGL is loaded, it takes a long time, which affects the user experience. In the three-dimensional visualization of the smart factory, there are a large number of three-dimensional scenes to be presented, which cannot be avoided by a simple method. A feasible and efficient AssetBundle resource packaging and loading system is needed for developers to quickly get started.

[0003] The engine supports editor customization, supports packaging resources into AssetBundle that adapts to different platforms, and loads at runtime. The existing resource loading system provides a fast packaging method, an existing ab package configuration file, and an ab package file loading method.

[0004] However, the existing resource loading system is relatively independent of packaging and loading, cannot control the order of loading, and needs to be called in the program. Only programmers can quickly get started. When facing a large number of resources that need to be packaged, the existing packaging method is very inconvenient, inefficient, and time-consuming. SUMMARY

[0005] In order to solve the above technical problems, the technical scheme adopted by the present application is as follows: a batch packaging and step-by-step loading system of assetbundle resources, the system comprising:

[0006] The original data layer describes the basic relationship of the core data;

[0007] The interactive data layer describes the relationship of the original data class from the perspective of the graphical interface;

[0008] The loading data layer describes the data after packaging from the perspective of the loading process;

[0009] The loading data layer describes the data after packaging from the perspective of the loading process;

[0010] The system defines parameters and builds relationships in the process of material data from original resources to AssetBundle resources and then to actual scene loading resources through the original data layer, the interactive data layer, and the loading data layer.

[0011] Preferably, the original data layer imports data resources through the input module, and the original data layer is an EditorResponse data type containing personresponse, modeload, baseInterface, tag, and name, wherein the personresponse contains a combinebundleunit array and a singlebundleunit array;

[0012] Singlebundleunit means a model ab package unit, which contains an enumeration type assettype, a string type type, a string type unittag, and an object array goes.

[0013] Combinebundleunit means a material ab package unit, which contains a string type combinename, an enumeration type assettype, a string type type, a string unittag, and an object array goes.

[0014] Preferably, the interactive data layer obtains data and generates packaged assetbundle files through the packaging module, and the interactive data layer includes a graphical interface, the graphical interface relies on the API of the custom editor, the custom visual EditorResponse, personresponse, singlebundleunit, and combinebundleunit, and each data class of the core data in the original data layer has a corresponding interactive data class presented in the custom panel.

[0015] Preferably, the graphical interface includes data resource import and open key logic, and through the “confirm”, “print”, “pre-packaging”, “packaging”, “delete file”, and “test” buttons in the graphical interface, the key packaging logic is autonomously executed, low-level problems are excluded, the intelligent degree of the system is reduced, and the development time is saved.

[0016] Preferably, in the graphical interface:

[0017] Clicking the “confirm” button indicates that the input of data has been completed;

[0018] Clicking the “print” button generates a configuration file according to the current input material data;

[0019] Clicking the “pre-packaging” button prints the data number of the material ab package unit and the model ab package unit in the graphical interface, so as to facilitate the user to confirm that the data update of the editor is completed, and to prepare for the next step of packaging the material resources into AssetBundle package resources.

[0020] Click the "packaging" button, if you click before not click "OK" button will error and can not be carried out, normal will be carried out in the current graphical interface data acquisition complete, according to the tag and name of EditorResponse, the corresponding folder is generated, and then the AssetBundle package packaging operation, generate AssetBundle file path consistent with the configuration file;

[0021] Click the "delete file" button, will delete the preset folder previously generated configuration file;

[0022] Click the "test" button, as a method is not set button, used for later maintenance debugging, binding specific method.

[0023] Preferably, the loading data layer includes a configuration file, the configuration file contains the same fields as the core data in the original data layer, and the loading path of the ab package is composed of a folder path and a file name. The loading data layer parses the configuration file through a loading module;

[0024] The folder path is composed of the tag and name of EditorResponse. The folder with the name of name contains all the material ab package units and model ab package units in the personresponse of EditorResponse. The name of each file is obtained from the goes array in the unit;

[0025] In the loading process, the method of string splicing is used to enter the predetermined outermost folder, traverse the material ab package unit and the corresponding model ab package unit, and finally all the materials and models are loaded in the scene in the order of material first and model second.

[0026] The method of the batch packaging and step-by-step loading system of assetbundle resources comprises the following steps:

[0027] Step 1: The original material data and user input parameters are input into the input module to generate corresponding configuration files and packaging path and packaging name data required for packaging operation;

[0028] Step 2: The packaging path and packaging name data prepared by the input module for packaging operation are obtained through the packaging module, combined with the API of the related AssetBundle of the engine, and the packaged AssetBundle files are batch generated in the corresponding packaging path;

[0029] Step three, during the business scene runtime, the configuration file is passed to the loading module, the loading module parses the configuration file, finds the packaged path and AssetBundle file, and loads them in turn.

[0030] Preferably, the input module: the user drags the material to the graphical interface, inputs the material data, and inputs the tag and name parameters;

[0031] After inputting, click the "OK" button to generate the material data in json format, and prepare the content for the configuration file generation; click the "print" button to write the converted data into the json file.

[0032] Preferably, the packing module: click the "pre-packaging" button to display the number of model ab package units and material ab package units in the packing data. When the number is 0, the packing will fail, and the interface needs to be refreshed to update the data.

[0033] After clicking the "packaging" button, read the unit data of the SingleBundleUnits array and the CombineBundleUnits array, get the tag and name, expand the ab package name from the material name, combine the folder path and the ab package name, splice the packaging path, take the packaging path as the parameter of the packaging method, and perform AssetBundle packaging. In this way, the packaging operation of all materials in the SingleBundleUnits array and the CombineBundleUnits array is completed.

[0034] Preferably, the loading module: in the business scene, introduce the script of the loading module, which can execute loading according to the demand during runtime.

[0035] The loading module needs to obtain the entire content of the response.json configuration file for json format analysis; each graphical interface printed configuration content will be in the form of an object in the responselist of the configuration file. When loading, the folder path is obtained by splicing the tag and name parameters of each object in the responselist. The AssetBundle file name is obtained by parsing each name in the goes array in the object. Combined with the pre-set outermost folder path or server url, the request path of the entire AssetBundle file is obtained. With the help of the engine's WebRequest request, a single AssetBundle resource is loaded.

[0036] The application realizes a graphical interface, reduces the operation threshold of packaged resources, designs a configuration file structure matched with the business of a smart factory, and can batch package the resources of a whole workshop by means of the graphical interface, establishes the association of packaging and loading, considers the characteristics of the workshop during the resource loading process, reduces the waiting time during the workshop loading process according to the configuration file, and takes into account the aesthetics.

[0037] The application discloses a batch packaging and step-by-step loading system and method of assetbundle resources.

[0038] 1. The graphical packaging interface reduces the operation threshold of the system, and improves the packaging efficiency of resources.

[0039] 2. The close coupling of the packaging process and the loading process makes the loading effect of the program running independent of the program, facilitates flexible modification, reduces the work flow, and improves the production efficiency of the whole content.

[0040] 3. The scene resources of the workshop can be loaded in a coarse-grained large block, and each scene resource of the workshop is packaged, which can be realized by a general resource management framework. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1 The figure shows the graphical interface of the embodiment of the application. DETAILED DESCRIPTION

[0042] The application will be further described in detail in combination with the drawings and specific embodiments.

[0043] Since the packaged materials are not necessarily every time, and are batched, the graphical interface needs to be presented, and the configuration file during loading can be generated from the packaged materials, and as can be seen, the main data of the system has three layers:

[0044] The original data layer describes the basic relationship of the core data;

[0045] The interactive data layer describes the relationship of the original data class from the perspective of the graphical interface;

[0046] The loading data layer describes the data after packaging from the perspective of the loading process.

[0047] The system defines the parameters and constructs the relationship in the process of material data from the original resource to the AssetBundle resource to the actual scene loading resource through the original data layer, the interactive data layer and the loading data layer, and the specific implementation is as follows:

[0048] 1. Data design

[0049] The original data layer contains EditorResponse, which is the data type of the entire interface, including personresponse, modeload, baseInterface, tag, and name, where personresponse contains a combinebundleunit array and a singlebundleunit array.

[0050] Singlebundleunit means model ab package unit, including enumerated type assettype, string type type, string type unittag, and object array goes.

[0051] Combinebundleunit means material ab package unit, including string type combinename, enumerated type assettype, string type type, string unittag, and object array goes.

[0052] 2. Configuration file

[0053] The configuration file provides the path and name of the AssetBundle resource for loading. Common configuration file formats include xml and json. Considering the small size, diverse platform adaptation, complete tool support, and powerful features of the json format, the system uses the json format and the litjson tool. litjson can convert classes composed entirely of string fields into json format data, or convert json format data into classes with consistent field names and string type fields, which can greatly speed up development and facilitate the allocation of resources to core functions.

[0054] The content of the configuration file belongs to the loading data layer, which contains fields that are basically the same as the fields in the core data of the original data layer in the data design. The loading path of an ab package is mainly composed of the folder path and the file name. The folder path is composed of the tag and name of the EditorResponse. The folder with the name inside contains all the material ab package units and model ab package units in the personresponse of the EditorResponse. The name of each file is obtained from the goes array in the unit.

[0055] In the loading process, the predetermined outermost folder is entered by string splicing method, and the material ab package unit and the corresponding model ab package unit are traversed and loaded until all the materials and models are loaded in the scene in the order of material first and model second.

[0056] 3. Graphical interface

[0057] The graphical interface belongs to the interactive data layer and relies on the API (application interface) of the custom editor. The EditorResponse, personresponse, singlebundleunit, and combinebundleunit are visualized, and each data class of the core data in the original data layer has a corresponding interactive data class, which is presented in the custom panel.

[0058] In addition to the import of data resources, the graphical interface also includes open and autonomous execution of key logic. Through the "determine", "print", "pre-pack", "pack", "delete file", and "test" buttons in the graphical interface, the key packing logic is executed, combined with the judgment of the system user, low-level problems are excluded, the intelligence of the system is reduced, and the development time is saved.

[0059] Clicking the "determine" button indicates that the input of data has been completed.

[0060] Clicking the "print" button will generate a configuration file based on the current input material data.

[0061] Clicking the "pre-pack" button will print the data number of the material ab package unit and the model ab package unit in the graphical interface. The purpose is to facilitate the user to confirm that the data update of the editor is completed, and to prepare for the next step of packing the material resources into AssetBundle package resources.

[0062] Clicking the "pack" button will generate a corresponding folder according to the tag and name of EditorResponse, and then perform AssetBundle package operation to generate AssetBundle file path consistent with the configuration file.

[0063] Clicking the "delete file" button will delete the previously generated configuration file in the preset folder.

[0064] Clicking the "test" button, as a button without set method, is used for binding specific methods during later maintenance and debugging.

[0065] The system is divided into input module, packing module, and loading module, and the system realizes the packing and loading process through the above modules.

[0066] The original material data and the user input parameters pass through the input module to generate the corresponding configuration file and the necessary packing path, packing name and other data for packing operation;

[0067] The input module prepares the packing path, packing name and other data for the packing operation, which is obtained through the packing module, combined with the API of the engine related AssetBundle, and generates the packed AssetBundle file in the corresponding packing path;

[0068] In the business scenario runtime, the configuration file is input to the loading module, and the loading module finds the packed path and AssetBundle file through the analysis of the configuration file, and loads them in turn.

[0069] The specific implementation of the three modules is as follows:

[0070] Input module: the user drags the material to the graphical interface, inputs the tag and name parameters, and clicks the "OK" button to generate the material data in json format, which prepares the content for the generation of the configuration file. Click "print" to write the converted data into a json file.

[0071] In order to retain the original configuration data, the configuration content of each graphical interface is accumulated in the responselist array of the configuration file in the form of an object, and each object contains the packing path and AssetBundle file name of the input module and other key parameters for loading.

[0072] Packing module: click "pre-packaging" to display the number of model ab package units and material ab package units in the packing data. When the number is 0, the packing will fail, and the interface needs to be refreshed to update the data.

[0073] Before packing, it should be noted that the packing of the system is for SingleBundleUnits array and CombineBundleUnits array. Input id, then start packing the material objects in the two units with index id in the two arrays. This packing method is suitable for the case where the lengths of the two arrays are consistent, and the material in the CombineBundleUnits array with the same id is the material of the model in the SingleBundleUnits array.

[0074] After clicking "packaging", the unit data of the SingleBundleUnits array and the CombineBundleUnits array are read, the tag and the name are obtained, the name of the ab package is expanded from the name of the material, the folder path and the ab package name are combined to splice the packaging path, the packaging path is taken as the parameter of the packaging method, the AssetBundle is packaged, and the packaging operation of all materials in the SingleBundleUnits array and the CombineBundleUnits array is completed.

[0075] Loading module: in the business scene, the script of the loading module is introduced, and loading can be performed according to requirements during running. The loading module needs to obtain the entire content of the response.json configuration file and perform json format analysis. The configuration content printed by each graphical interface is in the form of an object in the responselist of the configuration file. When loading, the folder path is obtained by splicing the tag and the name parameters of each object in the responselist. The AssetBundle file name is obtained by analyzing each name in the goes array in the object. The request path of the entire AssetBundle file is obtained by combining the pre-set outermost folder path or server url. With the help of the WebRequest request of the engine, a single AssetBundle resource is loaded.

[0076] In the specific implementation, the recursive loading starts from the last id of the CombineBundleUnits array object in the configuration file and ends at the first object of the array object. After loading the AssetBundle resource of the current id of the CombineBundleUnits, the model unit corresponding to the id in the SingleBundleUnits array is loaded, so as to ensure the loading order of the material and the model. The recursive use mainly considers the download time of the WebRequest request of the engine, that is, the download of the next resource is started after the download of the resource of the previous id is completed. Therefore, the recursive way is used. Only when the resource is downloaded, the current loaded id is updated, until all the resources of the id are loaded.

[0077] The application will be further described in detail in combination with the embodiments.

[0078]

Embodiment

[0079] Step 1, develop a graphical interface with a tree structure, and generate a json format configuration file according to the tree structure, which mainly includes material and model, and each part can set unlimited number of model prefabs and material resources through graphical interface.

[0080] Step 2, the graphical interface contains resource setting area and packaging control area, as shown in Figure 1 The resource setting area mainly includes overall parameter setting, material resource parameter setting, material resource list, model resource parameter setting, and model resource list, and the specific operation is as follows:

[0081] Step 2.1, set the path name of the packaging file, select the drop-down box as personresponse, and input the name parameter and tag parameter in the text input box respectively, then the path of the packaging file is the preset folder path->personresponse->”tag”->”name”->packaging file list, which will be used as the parameter of the configuration file.

[0082] Step 2.2, modify the size of SingleBundleUnits list to the number of steps needed for loading, such as dividing the whole workshop into ground, wall and roof for loading, then set the number of size to 3, then 3 SingleBundleUnits data will appear on the interface, find the goes list in SingleBundleUnits data, and according to the expected loading order, from top to bottom, drag the ground, wall and roof related prefab resource groups into the goes list of the three SingleBundleUnit in turn, such as the ground is composed of 3 prefabs, and the first loading ground is expected, then drag the 3 prefabs that make up the ground into the goes of the first SingleBundleUnit.

[0083] Each SingleBundleUnit can be regarded as a model ab package unit, and the order of the model ab package unit in the list is the loading order of the model ab package.

[0084] Step 2.3, modify the size of the CombineBundleUnits list to be the same as the number of SingleBundleUnits, for example, if the number of SingleBundleUnits is 3, input 3 after the size of CombineBundleUnits, then 3 CombineBundleUnits data with the same number of size will appear on the interface, and then set the name parameters of the 3 CombineBundleUnits in turn, input the name composed of lowercase English letters, such as mat_dimian, mat_qiangti, etc., after the name parameter is input, drag 3 groups of material balls in the goes list of the 3 CombineBundleUnits in turn, which are consistent with the order of SingleBundleUnits, for example, the material balls that make up the ground preform, a total of 5 material balls, and the loading order of the ground is the first, then drag the 5 material balls resources that describe the ground into the goes of the first CombineBundleUnits from top to bottom in turn.

[0085] Each CombineBundleUnit can be regarded as a material ab package unit, and the order of the material ab package unit in the list needs to be consistent with the order of the model ab package unit, for example, if the order of the model ab package unit is ground, wall, roof, then the order of the material ab package unit should also be ground, wall, roof, the consistency of the model ab package unit and the material ab package unit provides a simple corresponding structure, which is convenient for generating a corresponding configuration file, and is convenient for setting the loading order of the material first and the model second through the configuration file, to ensure that the model material resources are preloaded when loading according to the order of the model ab package unit, avoiding the loss of model materials.

[0086] Step 3, after setting the material ab package unit, model ab package unit, and model loading order, and the consistency of the material ab package unit and the model ab package unit according to step 2, operation needs to be performed in the packaging control area, the specific operation is as follows:

[0087] Step 3.1, click the OK button, then click the Print button, and in the console window, you can see the log, and "json saved" appears in the log.

[0088] In this process, the ab package unit data of the material ab package unit list and the model ab package unit list are integrated together as part of the workshop ab package configuration file, and a json file is generated and output to the pre-set json file path.

[0089] Step 3.2, click the pre-packaging button, and the log file appears "---- pre-detection ----", the log content includes the content after personresponse[1], which is separated by "~~~~~", and each "~~~~~" is "number 1 units number 2", where number 1 is the position of the ab package unit in the ab package unit list, such as the expected loading order according to step 2, the position of the ground related material ab package unit and the model ab package unit is 0, and so on, the wall is 1, and the roof is 2, and number 2 is the number of elements in the goes list in the ab package unit, such as in the ground related material ab package unit, 5 material ball resources are dragged in, then the number 2 of the ground corresponding material ab package unit should be 5, in addition to personresponse[1], there is also personresponse[2], the content after personresponse[1] and personresponse[2] is similar, the content after personresponse[1] describes the structure of the material ab package unit list, and the content after personresponse[2] describes the structure of the model ab package unit list. Through the pre-detection content, it can be directly confirmed whether the number of ab package packaging is consistent with the number of resources dragged in step 2. After confirming that the number is consistent, click the packaging button, and the scene ab package folder composed of material ab package and model ab package will be generated in the pre-set ab package generation path, which is determined by the name parameter and the tag parameter of the graphical interface.

[0090] Step 4, through step 3, the packaging file and the configuration file have been generated, in the scene where the packaged resources need to be loaded, a new empty object is created, and the loading script ModelBundleMgr in the tool is bound, and the BundleType and BundleTag parameters in ModelBundleMgr are set, wherein the BundleTag parameter should be consistent with the tag parameter set in the graphical interface, and the BundleType should be set to "PersonResponse". Running in the editor can see that the packaged resources are loaded in the expected packaging order.

[0091] The above embodiments are not limitations of the present application, and the present application is not limited to the above examples. Changes, modifications, additions or substitutions made by those skilled in the art within the scope of the technical solutions of the present application also belong to the protection scope of the present application.

Claims

1. A system for batch packaging and step-by-step loading of assetbundle resources, characterized in that: The system comprises: An original data layer: describing the basic relationship of core data; An interactive data layer: describing the relationship of the original data class from the perspective of the graphical interface; The interactive data layer obtains data through a packaging module and generates a packaged assetbundle file, the interactive data layer includes a graphical interface, the graphical interface relies on the API of a custom editor, the custom visual EditorResponse, personresponse, singlebundleunit, and combinebundleunit, and each original data layer has a corresponding interactive data class to present in the custom panel; The graphical interface includes the import of data resources and the opening of key logic, and through the operation buttons "Determine", "Print", "Pre-packaging", "Packaging", "Delete file", and "Test" in the graphical interface, the key packaging logic is autonomously executed, the interface is used for visual editing of the custom visual data class, and a series of fixed and coherent operation logics such as "Print" configuration file, "Pre-packaging" detection, and "Packaging" generation of AssetBundle file are executed through the above buttons; In the graphical interface: Clicking the "Determine" button indicates that the input of data has been completed; Clicking the "Print" button generates a configuration file according to the current input material data; Clicking the "Pre-packaging" button prints the data number of the material ab package unit and the model ab package unit in the graphical interface, so as to facilitate the user to confirm that the data update of the editor is obtained, and to prepare for the next step of packaging the material resources into AssetBundle package resources; Clicking the "Packaging" button will report an error and cannot be performed if the "Determine" button is not clicked before, and when normally performed, the data obtained in the graphical interface is generated into a corresponding folder according to the tag and name of the EditorResponse, and then the AssetBundle package operation is performed to generate an AssetBundle file path consistent with the configuration file; Clicking the "Delete file" button deletes the previously generated configuration file in the preset folder; Clicking the "Test" button, as a button without setting method, is used for binding specific methods during later maintenance and debugging; A loading data layer: describing the data after packaging from the perspective of the loading process; The loading data layer includes a configuration file, the fields contained in the configuration file are consistent with the fields of the core data in the original data layer, the loading path of the ab package is composed of a folder path and a file name, and the loading data layer parses the configuration file through a loading module; The folder path is composed of the tag and name of the EditorResponse, the folder with the name of the name contains all the packaging files of the material ab package unit and the model ab package unit in the personresponse of the EditorResponse, and the name of each file is obtained from the goes array in the unit. The loading process is achieved by string splicing, and the predetermined outermost folder is entered to traverse and load the material ab package unit and the corresponding model ab package unit until all the materials and models are completely loaded in the scene in the order of material first and model second. The implementation of the loading process depends on the premise that the two arrays of CombineBundleUnits and SingleBundleUnits in the interactive data layer are one-to-one corresponding. The system defines parameters and builds relationships in the process of loading material data from original resources to AssetBundle resources and then to actual scene resources through the original data layer, the interactive data layer, and the loading data layer.

2. The system of bulk packaging and step loading of assetbundle resources according to claim 1, wherein: The original data layer imports data resources through the input module, and the original data layer is of the EditorResponse data type containing personresponse, modeload, baseInterface, tag, and name. The personresponse contains the combinebundleunit array and the singlebundleunit array. Singlebundleunit means a model ab package unit, which contains the enumeration type assettype, the string type type, the string type unittag, and the object array goes. Combinebundleunit means a material ab package unit, which contains the string type combinename, the enumeration type assettype, the string type type, the string unittag, and the object array goes.

3. The method for batch packing and step loading of assetbundle resources as claimed in claim 1, wherein: The method comprises the following steps: Step one, the original material data and the user input parameters are input into the input module to generate the corresponding configuration file and the necessary packing path and packing name data for the packing operation; Step two, the input module prepares the packing path and packing name data for the packing operation, and the packing module obtains the data in combination with the relevant AssetBundle API of the engine to generate the packed AssetBundle file in the corresponding packing path; Step three, during the operation of the business scene, the configuration file is input into the loading module, the loading module finds the packed path and AssetBundle file by analyzing the configuration file, and then loads them in sequence.

4. The method for batch packing and step loading of assetbundle resources according to claim 3, wherein: The input module: the user drags the material to the graphical interface, inputs the material data, and inputs the tag and name parameters; After the input is completed, the "OK" button is clicked to generate the material data in the json format to prepare the content for the generation of the configuration file; The "print" button is clicked to write the converted data into the json file.

5. The method for batch packing and step loading of assetbundle resources as claimed in claim 3, wherein: The packing module: click the "pre-packaging" button to display the number of model ab package units and material ab package units in the packing data. When the number is 0, the packing will fail, and the interface needs to be refreshed to update the data; After clicking the "package" button, traverse the unit data of the SingleBundleUnits array and the CombineBundleUnits array to obtain the tag and name, expand the name of the ab package from the name of the material, combine the folder path and the ab package name to splice the package path, use the package path as the parameter of the package method, and perform AssetBundle packaging to complete the packaging operation of all materials in the SingleBundleUnits array and the CombineBundleUnits array.

6. The method for batch packing and step loading of assetbundle resources as claimed in claim 3, wherein: The loading module: in the business scene, introduce the script of the loading module, and execute loading according to the needs during running; The loading module needs to obtain the entire content of the response.json configuration file and perform json format analysis; the configuration content printed by each graphical interface is in the form of an object in the responselist of the configuration file, and the folder path is obtained by splicing the tag and name parameters of each object in the responselist during loading; the AssetBundle file name is obtained by analyzing each name in the goes array in the object; the request path of the entire AssetBundle file is obtained by combining the pre-set outermost folder path or server url; and the single AssetBundle resource is loaded by means of the WebRequest request of the engine.

Citation Information

Patent Citations

  • Unity 3D technology-based resource reuse implementation method and device thereof

    CN105787991A

  • A 3D cross-platform resource management system and method

    CN109508319A