API reference

OVRGLTFLoader Class

Fields

OVRGLTFScene scene[Get]
Func< string, Material, Texture2D > textureUriHandler[Get]

Public Statics

static readonly Vector3 GLTFToUnitySpace[Get]
static readonly Vector3 GLTFToUnityTangent[Get]
static readonly Vector4 GLTFToUnitySpace_Rotation[Get]

Member Functions

OVRGLTFLoader
( string fileName )
OVRGLTFLoader
( byte[] data )
OVRGLTFLoader
( Func< Stream > deferredStream )
OVRGLTFScene LoadGLB
( bool supportAnimation,
bool loadMips )
IEnumerator LoadGLBCoroutine
( bool supportAnimation,
bool loadMips )
void SetModelShader
( Shader shader )
void SetModelAlphaBlendShader
( Shader shader )
void SetTextureQualityFiltering
( OVRTextureQualityFiltering loadedTexturesQuality )
All textures in the glb will be loaded with the following setting.
The default is Bilinear. Once loaded, textures will be read-only on GPU memory.
Parameters
loadedTexturesQuality
The quality setting.
void SetMipMapBias
( float loadedTexturesMipmapBiasing )
All textures in the glb will be preset with this MipMap value.
The default is 0. Only supported when MipMaps are loaded and the provided shader has a property named "_MainTexMMBias"
Parameters
loadedTexturesMipmapBiasing
The value for bias. Value is clamped between [-1,1]

Static Member Functions

static OVRTextureQualityFiltering DetectTextureQuality
( in Texture2D srcTexture )
Decodes the Texture Quality setting from the input Texture2D properties' values.
Parameters
srcTexture
The input Texture2D
Returns
The enum TextureQualityFiltering representing the quality.
static void ApplyTextureQuality
( OVRTextureQualityFiltering qualityLevel,
ref Texture2D destTexture )
Applies the input Texture Quality setting into the ref Texture2D provided as input.
Texture2D must not be readonly.
Parameters
qualityLevel
The quality level to apply
destTexture
The destination Texture2D to apply quality setting to
static bool ValidateGLB
( Stream glbStream )
static byte[] ReadChunk
( Stream glbStream,
OVRChunkType type )
static bool ValidateChunk
( Stream glbStream,
OVRChunkType type,
out uint chunkLength )