Voxel toolkit
The toolkit that lets you easily import .vox assets and have runtime API
|
Builds a game objects hierarchy for a specific asset. More...
Public Member Functions | |
GameObject | CreateGameObject (VoxelAsset asset) |
Creates a game object for the given asset. | |
Properties | |
float | HueShift = 0.0f [get, set] |
The hue shift to be applied to the materials. | |
float | Saturation = 1.3f [get, set] |
Saturation to be applied to the materials. | |
float | Brightness = 0.0f [get, set] |
Brightness to be applied to the materials. | |
UnityEngine.Material | OpaqueMaterial [get, set] |
The opaque material to be used for the object built. | |
UnityEngine.Material | TransparentMaterial [get, set] |
The transparent material to be used for the object built. | |
float | TransparentEdgeShift [get, set] |
How much should transparent edges of the mesh should be shifted (Helps with the incorrect shadows) | |
float | OpaqueEdgeShift [get, set] |
How much should opaque edges of the mesh should be shifted (Helps with the incorrect shadows) | |
float | Scale = 0.1f [get, set] |
The scale of the mesh built. | |
int | ChunkSize = 16 [get, set] |
The chunk size to be used to generate the mesh. | |
MeshGenerationApproach | MeshGenerationApproach = MeshGenerationApproach.Textureless [get, set] |
Generation approach to be taken to generate meshes. | |
OriginMode | OriginMode = OriginMode.Center [get, set] |
The origin mode of the objects to be generated. | |
IndexFormat? | IndexFormat [get, set] |
Index format to be used. If null UInt32 will be used if supported | |
bool | GenerateColliders = true [get, set] |
If set the resulting objects going to have mesh colliders with respected meshes. | |
bool | ReduceHierarchy = true [get, set] |
Should the hierarchy be reduced to remove empty objects. | |
Builds a game objects hierarchy for a specific asset.
GameObject VoxelToolkit.GameObjectBuilder.CreateGameObject | ( | VoxelAsset | asset | ) |
Creates a game object for the given asset.
asset | The asset to generate game object hierarchy from |