The Naming Convention Asset is a special Scriptable Object that can be created to change the format used/expected by the Slicer tool. When I speak of format, I am referring to the format of object/asset names.
Providing a Naming Convention asset is optional. Our products create a default naming convention for Naming Convention fields that are null, and in 99% of cases, that default format will function perfectly.
You can create this asset by selecting from the Top Menu Bar:
Assets -> Create -> Deep Space Labs -> Core -> Naming Convention
or by right clicking a folder (or inside a folder) within the Project Hierarchy and selecting from the pop up menu:
Create -> Deep Space Labs -> Core -> Naming Convention
By default this Asset is given the name NamingConvention, however we recommend changing this name to something that will better help you differentiate it with other Naming Convention Assets in the future.
Terra Slicer uses Naming Conventions in two ways
1) When slicing groups, it uses the Input Naming Convention to generate the names of the prefabs that it searches for. If the convention is not set correctly (or not set to null if using the default naming convention), the Slicer will not be able to located the prefabs from the group!
2) The Output Naming Convention is used to generate the names of slice game objects/prefabs as well as the slice Terrain Data assets.
All names are generated programatically using the same logic employed by the String.Format method, whereby special characters are replaced by row/column/layer values and combined with literal string characters to produce a final string name.
There are several special characters available to you in defining the naming convention, each replaced by different per-slice data in order to produce the Asset Chunk Names:
1) %g - Replaced by the Group Name of the Slices, Slice Data, or original texture layer name (when duplicating Texture Layers).
2) %y - Replaced by a slices Row Number.
3) %x - Replaced by a slices Column Number.
4) %z - Usually replaced by Layer, however this is not used with Terra Slicer.
5) %c - Usually replaced by the Chunk Number, however this is not used with Terra Slicer.
Any other characters not listed above will be treated as literal characters and placed into the outputted Asset Chunk Name string as they appear in the format string.
--Why Not Write Out The Group Name Rather Than Use %g?--
If you were to write out the Group Name for a slicing group as literal characters in the Format Fields (see below), you would need to create a unique Naming Convention asset for each slicing group. By using special characters (%g), Terra Slicer is able to use a single Naming Convention for multiple Slicer assets, reducing the number of unique Naming Convention assets you need to create.
This field contains the format to use to generate all names. Since Terra Slicer does not use %c or %z, those charactesr will be treated as literal characters if placed in this format, therefore it is generally a good idea to leave those special characters out of this format.
Not used by Terra Slicer. If you want to learn about this field's use with SAM, please open the SAM Editor Guide.
The first slice should usually start its numbering at 1. For example, the first slice produced by the Terra Slicer tool should typically be named GroupName_1_1.
Some 3rd party programs and Asset Store Products require Assets that begin at 0 rather than 1. If that is the case with your Assets, you can enable the Numbering Starts At 0 setting.
If no Naming Convention asset is provided to a Naming Convention field, Terra Slicer is able to auto generate default formats that work in 99% of cases. This makes creating/adding Naming Convention assets a task that needs doing only in special circumstances, reducing your overall workload.
There are a few Default Formats, which are automatically and correctly generated based on whether your Asset Chunk Groups/Streamable Grids are 2D or 3D. Because Terra Slicer only uses one of these default formats, we only list that one here:
2D First Chunk Format: %g_%y_%x
It is recommended to avoid placing numbers and brackets { or } in your format string, as it can complicate things for the World Designer tool (if using SAM) and cause it to not work correctly! If you do use numbers, do not place them inside brackets and do not place them next to any of the special characters that will be replaced by a number (%y, %x, %z, %c). That is, making sure there is at least one literal character between the literal number and the special character.
--Upgrade Note--
The Naming Convention asset has some new settings that apply to Multi-Chunking. Since Multi-Chunking is not used when slicing, you can ignore these fields, however if you are planning on using the Naming Convention assets with the Streamable Assets Manager, you should take a look at the Naming Convention Upgrade Section in the Upgrading Chapter in the SAM Editor Guide for a list of changes you will need to take into account. Note that all Naming Conventions previously used will need to be reproduced!