C++ Java Unity
Unity Reference
GLBHelper Class Reference

Static Public Member Functions

static bool ExtractGLBResources (byte[] bytes, out string glTFJson, out byte[] binaryBuffer)
 This function takes the full binary data of a glb (version 2) and is able to extract the gltf json and the binary blob from it More...
 
static bool ExtractGLBResources (string path, out string glTFJson, out byte[] binaryBuffer)
 This function takes the path to a glb (version 2) and is able to extract the gltf json and the binary blob from it More...
 
static bool IsBinaryGlTF (ref byte[] bytes)
 Function to check if a byte array contains a binary gltf file More...
 

Member Function Documentation

static bool ExtractGLBResources ( byte[]  bytes,
out string  glTFJson,
out byte[]  binaryBuffer 
)
static

This function takes the full binary data of a glb (version 2) and is able to extract the gltf json and the binary blob from it

Parameters
bytesBinary contents of glb file
glTFJsonResulting gltf
binaryBufferResulting binary blob
Returns
if successfull
static bool ExtractGLBResources ( string  path,
out string  glTFJson,
out byte[]  binaryBuffer 
)
static

This function takes the path to a glb (version 2) and is able to extract the gltf json and the binary blob from it

Parameters
pathPath to glb file
glTFJsonResulting gltf
binaryBufferResulting binary blob
Returns
if successfull
static bool IsBinaryGlTF ( ref byte[]  bytes)
static

Function to check if a byte array contains a binary gltf file

Parameters
pathbinary data
Returns
If it is a binary glTF