public sealed class NamingConvention : ScriptableObject, INamingConvention
A Naming Convention implemented as a scriptable object. You can create a NamingConvention
asset via
Assets -> Create -> Deep Space Labs -> Core -> Naming Convention.
These assets are used by the different tools/components in the Terra Slicer and S.A.M.
- Streamable Assets Manager packages
to procedurally build the names of Assets and other things at runtime or while a tool
is executing. This saves on mememory as it
means the asset names do not need to be saved to a file and included with the game
build.
If a NamingConvention field is visible on a component or tool and no
asset is provided, a default INamingConvention implementation will be used, which
has the following characteristics.
First Chunk Format 2D: %g_%y_%x
First Chunk Format 3D: %g_%z_%y_%x
Supplemental Chunk (2+) Format 2D: %g_%y_%x_Chunk%c
Supplemental Chunk (2+) Format 3D: %g_%z_%y_%x_Chunk%c
When using these Formats to generate names, the %g characters are replaced by the
Group Name of whatever group the Asset belongs to. In SAM, this is the
Group Name associated with the LOD Group (found on the Streamable Grid asset). In
Terra Slicer, this is the common named provided to the Slicer Tool for
a set of prefabs or Terrain Data assets.
%y is replaced by the Row number an Asset belongs to, while %x is replaced by the
Column number. %z is replaced by the Layer number, but is only used
in SAM when using a 3D Streamable Grid. In addition, %c is replaced by a Chunk Number,
but is only used in SAM when an LOD Group uses multi-chunking (and
in this case, it is only used in the Supplemental Chunk Format, which is used to generate
names for Chunks 2+ in a Chunk Set).
The First Chunk Format is used to generate names for the first Asset Chunk in an Asset
Chunk Set, or to generate names for Assets where multi-chunking is
not used or not applicable (such as the Terra Slicer tool). The Supplemental Chunk
Format is used to generate names for Asset Chunks 2, 3, and so on, and is only
used by SAM.
The default naming convention automatically generates its Formats according to whether
the tool/component it is being used with has 2D or 3D properties, however
this is not possible when you create custom Naming Convention instances. As such,
you need to explicitly setup your Format fields to use the third dimension
(%z - which is the layer) if it is necessary (which will only be the case when using
SAM and a Streamable Grid with Axes set to Three Dimensional).
You can find more information about
Naming Conventions in the Editor Guide for the Terra Slicer or SAM.