Voxel toolkit
The toolkit that lets you easily import .vox assets and have runtime API
Loading...
Searching...
No Matches
VoxelToolkit.VoxelAsset Class Reference

Represents the voxel asset. More...

Inheritance diagram for VoxelToolkit.VoxelAsset:

Public Member Functions

void SetPaletteMaterial (int index, Material material)
 Sets the material into the palette.
 
Material GetPaletteMaterial (int index)
 Returns the material from the palette.
 
void AddLayer (Layer layer)
 Adds the layer to the asset.
 
Layer FindLayerById (int id)
 Returns a layer by it's ID.
 
Layer GetLayer (int index)
 Returns the layer by its index.
 

Properties

ReadonlyArray< MaterialPalette [get]
 Allows access to the palette of the asset.
 
HierarchyNode HierarchyRoot [get, set]
 The root object of the hierarchy.
 
string Version [get, set]
 The version of the asset.
 
string InputSource [get, set]
 The way the asset was imported.
 
int LayersCount [get]
 The count of layers in the asset.
 
List< ModelModels [get]
 Provides models contained in the asset.
 

Detailed Description

Represents the voxel asset.

Member Function Documentation

◆ AddLayer()

void VoxelToolkit.VoxelAsset.AddLayer ( Layer  layer)

Adds the layer to the asset.

Parameters
layerThe layer to be added

◆ FindLayerById()

Layer VoxelToolkit.VoxelAsset.FindLayerById ( int  id)

Returns a layer by it's ID.

Parameters
idThe ID of the layer to be found
Returns
The layer with a specified ID

◆ GetLayer()

Layer VoxelToolkit.VoxelAsset.GetLayer ( int  index)

Returns the layer by its index.

Parameters
indexThe index of the layer to return
Returns

◆ GetPaletteMaterial()

Material VoxelToolkit.VoxelAsset.GetPaletteMaterial ( int  index)

Returns the material from the palette.

Parameters
indexThe index of the material
Returns
Material with the index
Exceptions
ExceptionThrows exception if the index is less than 0 or more than 255

◆ SetPaletteMaterial()

void VoxelToolkit.VoxelAsset.SetPaletteMaterial ( int  index,
Material  material 
)

Sets the material into the palette.

Parameters
indexThe index of the materials to be set
materialThe material to be set
Exceptions
ExceptionThrows exception if the index is less than 0 or more than 255

Property Documentation

◆ Models

List<Model> VoxelToolkit.VoxelAsset.Models
get

Provides models contained in the asset.

Returns
The models of the asset

The documentation for this class was generated from the following file: