C API Unity API
Unity API Reference (Version 10.22.5)
GLTFModelCreator Class Reference

A utility class that creates Unity meshes from glTF. Used with ModelTarget and AreaTarget datasets More...

Public Member Functions

void Clear ()
 Clears the allocated native memory More...
 
GameObject ExtractModel (string path, Material customMaterial, bool ignoreMaterials=false)
 Extracts the glTF model at the given path, with the help of the cached files Used for Model Target or Area Target extraction run-time More...
 
GameObject ExtractModel (string path, Material[] customMaterials, bool ignoreMaterials=false)
 Extracts the glTF model at the give path, with the help of the cashed files Used for Model Target or Area Target extraction run-time More...
 

Detailed Description

A utility class that creates Unity meshes from glTF. Used with ModelTarget and AreaTarget datasets

Member Function Documentation

◆ Clear()

void Clear ( )
inline

Clears the allocated native memory

◆ ExtractModel() [1/2]

GameObject ExtractModel ( string  path,
Material  customMaterial,
bool  ignoreMaterials = false 
)
inline

Extracts the glTF model at the given path, with the help of the cached files Used for Model Target or Area Target extraction run-time

Parameters
pathThe path to the glTF model
customMaterialA custom material to apply to the extracted model. If you want to use textures, the material must be based on Unity's "Standard" material
ignoreMaterialsIf the parser should ignore the materials specified in the glTF file
Returns
The gameObject that is created from the glTF file

◆ ExtractModel() [2/2]

GameObject ExtractModel ( string  path,
Material []  customMaterials,
bool  ignoreMaterials = false 
)
inline

Extracts the glTF model at the give path, with the help of the cashed files Used for Model Target or Area Target extraction run-time

Parameters
pathThe path to the glTF model
customMaterialsThe custom materials to apply to the extracted model. If you want to use textures, the materials must be based on Unity's "Standard" material
ignoreMaterialsIf the parser should ignore the materials specified in the glTF file
Returns
The gameObject that is created from the glTF file