Manage items in an asset bundle
You can manage items in an asset bundle via the default tree view interface or a path view interface. These are available in the Create asset bundle pane and the Manage assets and folders dialog.
Items in an asset bundle can include assets, folders, or other asset bundles. These items are included in, or excluded from, an asset bundle with path rules. See Path view.
Tree view
The Tree view contains a tree of items to be included in the asset bundle.
To select the Tree view, click Tree view.
-
Click an item in the tree to select it. Click the item again to clear the selection. You can select multiple items. To clear the current selection, click Cancel selection.
-
Apply a rule by clicking one of the buttons above the tree:
-
Include: Add an inclusion rule. The item is highlighted in bold and a green tick
is displayed next to the item.
-
Exclude: Add an exclusion rule. The item is highlighted in bold and a red dash
is displayed next to the item.
-
Clear: Remove the current rule. Any bold highlighting is removed. No icon is displayed next to the item (unless superseded by another rule).
A rule applied to a folder affects the items within it (including items within subfolders). Items affected by a rule in this way are marked with a tick or dash in a lighter shade of the corresponding color.
All of the current rules are displayed in the Path view.
-
-
Point to the tick or dash next to an item to see a tooltip explaining why that item has been included or excluded from the asset bundle.
-
Click Save changes.
The asset bundle is saved. Items marked with a green tick are included in the asset bundle and items marked with a red dash are excluded from the asset bundle.
Path view
The Path view lists the current path rules for the asset bundle.
To select the Path view, click Path view .
-
Enter a list of path rules.
-
Click Save changes.
The path rules are applied and the asset bundle is updated.
Path rules determine which items will be included in or excluded from the asset bundle. The following apply to path rules:
-
Each path rule must be on a separate line.
-
Path rules are processed in the order in which they are listed, from top to bottom.
-
Each path rule must begin with // or -//.
-
The first item in a path rule (after the //) must be an existing depot.
-
Three dots (...) can be used at the end of a path rule to refer to all files and folders recursively within a specified folder.
Example:
The following are valid path rules:
Path rule | Result |
---|---|
//depotName/folderName/fileName | The file fileName is included in the asset bundle. |
-//depotName/folderName/fileName | The file fileName is excluded from the asset bundle. |
//depotName/folderName/... | All files in the folder folderName are included in the asset bundle. |
The following are invalid path rules:
Path rule | Reason for being invalid |
---|---|
depotName/folderName/fileName | Paths must begin with //. |
//folderName/fileName | The first item in a path must be a depot. |
//depotName/.../fileName | ... can only be used at the end of a path. |
Example:
Consider the following set of files that exist in my-depot/MyCollection:
Vehicles/ Car.png Bike.png CarWheels.svg Bikes.p4bundle Misc.jpg Scenery.gif
An asset bundle is created in MyCollection with the following path rules:
//MyDepot/MyCollection/Vehicles/...
-//MyDepot/MyCollection/Vehicles/Car.png
//MyDepot/MyCollection/Bikes.p4bundle
-//MyDepot/MyCollection/Scenery.gif
This results in the following asset bundle:
Vehicles/ Bike.png CarWheels.svg Bikes.p4bundle
where:
-
Bike.png, and CarWheels.svg are included in the asset bundle because they are inside the Vehicle folder, which has an inclusion rule.
-
Despite being inside the Vehicles folder, Car.png is not included because the last rule applied to it is an exclusion rule.
-
Bikes.p4bundle is included because it has an inclusion rule.
-
Misc.jpg is not included because it does not have an inclusion rule.
-
Scenery.gif is not included in the asset bundle because it has an exclusion rule, although the rule is unnecessary. If the file had been inside a folder that had been included, the exclusion rule would have been necessary.