Generate Asset Library
Asset Library
An asset library is a binary compact format containing all user defined artifacts part of a solution.
Open "Generate Asset Library" dialog via menu or toolbar item.


The "Generate Asset Library" dialog lists following items part of the solution for asset generation:
- All items having the property "Export Always" enabled.
- All items which are referred by exported items.
The "Generate Asset Library" dialog is structured as a tree, for easier selection of multiple items from the same folder/module. When a user checks a folder for excluding, all the items from the folder which can be excluded will also be checked.

In the upper part of the "Generate Asset Library" dialog two search boxes are available, for easier identification of any desired item in the Profile list or in the Excluded Items list.
Saving Asset Profile
On the left side, the Current Asset Profile can be seen. If needed, it is possible to create and save different asset profiles. First the new asset profile has to be created by using the "Add" button. After associating the new asset profile with a specific name, these options should be configured:
- Exclude Item: The checkbox in the "Exclude Item" list allows to explicitly exclude items from asset generation. Although, checked items will not be excluded if other items of the asset require them.
- Asset File: Specify the location of the asset file being generated.
- Environment: Select either "Simulation" or "Target". Note that all shaders used in the solution as well as additional shaders with the property "Export Always" enabled will be added to the asset file.
- Float Number Format: The Float Number Format will show, depending on the platform used, the type of numbers generated in the Asset Library.
- Display asset report: Shows a report containing the serialized items after asset generation. See more info
here.here. - Run script: Execute the given script after asset generation. See more info
here.here.
The options "Select, Expand All and Collapse All" are available for every item right clicked inside "Scene Tree" side of the view.

From all the items available, if necessary, some of them can be excluded by clicking on the checkboxes from the "Exclude Item" list.
After all these settings are done, the "Update" button should be used. This operation can be done for every different generation. In this way, every new created asset profiles can be saved.
The following fields will be saved in the asset profile: "Environment", "Float Number Format", "Asset ID", "Display asset report" and "Run script". The value of the "Asset Location" will also be saved when saving an asset profile.
If a modification is done in a current asset profile, the "Update" button should be used again to save the changes.
The "Delete" button should be used to erase a useless profile.
When the SC is open none of the saved asset profiles will be selected. To use any of the saved asset profiles, the user should choose one of them.
Generate the Asset
Generate the asset file by pressing the "Generate" button. If the generation operation will end successfully, in the location where the asset is generated three different files will become available.
- A binary (.bin) file containing all user defined artefacts that are part of a solution
- A C++ header (.h) with all the symbolic names from the solution
- An Extensible Markup Language (.xml) document that contains information about the asset items which accessed strings from the name table (offset, value, item name, etc.)
Asset Generation Report
If the generating was done successfully and the checkbox "Display asset report" is checked, the "Asset Generation Report" dialog will appear. The report contains a list of all serialized items and the output of the script if the "Run script" checkbox was enabled.

The total sum of the items displayed in the "Asset Generation Report" is different than all the items summed up. This is the consequence of the fact that the "Total" size should match the size of the asset file which contains more data than the list of "regular" items. The asset header, the name table, AutoUniforms, ShaderAttributes and the index table of each sub lib (scenes, animations, etc.) contain additional information.
The content of this dialog can be saved in CSV (Comma Separated Values) format by clicking the "Save..." button.
Run Script
If enabled this option allows to run a script after the asset is generated. The syntax of the command is the following:
Script_path [arg1] [arg2] [arg3] ...
- Script_path is absolute or relative to the solution
- Arguments are optional
- Arguments containing white spaces should be put between double quotes (e.g. "this is one argument")
- The following macro variables can be used as arguments:
- $AssetFileName: the path to the asset file
- $AssetProfileName: the name of the selected asset profile
- $CustomId: The Asset Id of the selected asset profile
- $AssetFileName: the path to the asset file
Example:
c:\scripts\my_script.cmd $AssetProfileName "another param"
Missing Dependencies
In case of missing dependencies, no asset generation is possible. In this case, the "Missing Dependencies" dialog lists all items with missing dependencies:
