Version: 
PiXYZ Plugin for Unity
Scripting API Documentation
ImportSettings

Inherits ScriptableObject.

Public Attributes

float scaleFactor = 0.001f
 
bool isRightHanded = false
 
bool isZUp = true
 
TreeProcessType treeProcess = TreeProcessType.NONE
 
bool loadMetadata = true
 
bool hasLODs = false
 
LODsMode lodsMode = LODsMode.LEAVES
 
LODsSettings lodSettings = new LODsSettings()
 
bool mapUV = false
 
float mapUV3dSize = 1f
 
bool createLightmapUV = false
 
int lightmapResolution = 1024
 
int UVPadding = 2
 
bool orient = false
 
bool splitTo16BytesIndex = false
 
Shader shader
 
bool useMaterialsInResources = false
 

Detailed Description

This class inherits from Unity's ScriptableObject and can be serialized. This allows users to save presets and to use them either from the Import Window or from scripting by declaring a public field in a MonoBehaviour class. This class can also be created at runtime.

Member Data Documentation

◆ createLightmapUV

bool createLightmapUV = false

Create Lightmap UVs.

◆ hasLODs

bool hasLODs = false

The LODs (Level Of Detail) is an optimization feature that allows Unity to automatically switch a model quality depending on its occupancy relatively to the screen (in %).

◆ isRightHanded

bool isRightHanded = false

Mirror CAD right or left.

◆ isZUp

bool isZUp = true

Use this setting to rotate model from Z-up axis to Y-up axis.

◆ lightmapResolution

int lightmapResolution = 1024

Resolution (in pixels).

◆ loadMetadata

bool loadMetadata = true

Load metadata from the imported model.

◆ lodSettings

LODsSettings lodSettings = new LODsSettings()

The LODs settings describes LODs to be generated with their associated threshold and quality.

◆ lodsMode

The LODs level tells if the LOD should be managed at assembly (Root) or at model (Leaves) level.

◆ mapUV

bool mapUV = false

Create a new projected primary UV set (channel #0).

◆ mapUV3dSize

float mapUV3dSize = 1f

The size of the projection box used to create UVs.

◆ orient

bool orient = false

Orient normals of adjacent faces consistently.

◆ scaleFactor

float scaleFactor = 0.001f

Scale factor applied to the whole assembly.

◆ shader

Shader shader

If specified, the import will use the given shader to create materials contained in the imported model.

If not specified, it will use the default shader for the current Render Pipeline.

◆ splitTo16BytesIndex

bool splitTo16BytesIndex = false

Use this setting if you wish to create meshes limited to 65k vertices.

Meshes will be created with a 16 bit index buffer (32 bit by default).
Consider using this setting if you wish to publish the model on platform with limited power.

◆ treeProcess

Use these functions to simplify the tree (or hierarchy) of your model.

◆ useMaterialsInResources

bool useMaterialsInResources = false

If true, PiXYZ will attempt to load materials whose name match the name of the imported one.

Materials to load needs to be placed at the root of a Resources folder, somewhere in the project Assets.

◆ UVPadding

int UVPadding = 2

Set the padding (in pixels) between UV islands.