Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Assets/NewtonVR/WindowsMR/NVRWindowsMRInput.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
Expand All @@ -12,6 +13,7 @@
using GLTF;
using UnityEngine.XR.WSA.Input;
using HoloToolkit.Unity;
using UnityGLTF;

#if !UNITY_EDITOR
using Windows.Foundation;
Expand Down Expand Up @@ -207,12 +209,12 @@ private IEnumerator LoadSourceControllerModel(InteractionSource source)
#endif

RenderModel = new GameObject { name = source.handedness + "-glTFController" };
GLTFComponentStreamingAssets gltfScript = RenderModel.AddComponent<GLTFComponentStreamingAssets>();
gltfScript.ColorMaterial = GLTFMaterial;
gltfScript.NoColorMaterial = GLTFMaterial;
gltfScript.GLTFData = fileBytes;
GLTFComponent gltfScript = RenderModel.AddComponent<GLTFComponent>();
gltfScript.GLTFConstant = gltfScript.GLTFStandard = gltfScript.GLTFStandardSpecular = GLTFMaterial.shader;
gltfScript.UseStream = true;
gltfScript.GLTFStream = new MemoryStream(fileBytes);

yield return gltfScript.LoadModel();
yield return gltfScript.WaitForModelLoad();

RenderModelInitialized = true;
loading = false;
Expand Down