C++ Java Unity
Unity Reference
GLTFModelCreator Class Reference

Static Public Member Functions

static GameObject ExtractModel (string path, string jsonString, Dictionary< string, byte[]> cachedFiles, Material customMaterial, bool extractTextures=true)
 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...
 

Member Function Documentation

static GameObject ExtractModel ( string  path,
string  jsonString,
Dictionary< string, byte[]>  cachedFiles,
Material  customMaterial,
bool  extractTextures = true 
)
static

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
jsonStringContents of the glTF file
cachedFilesCached files of external dependencies to glTF
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
extractTexturesSet this option to false if you do not intend to use the textures defined in the GLTF. They will never be extracted, potentially saving a large amount of memory
Returns
The gameObject that is created from the glTF file