@@ -74,7 +74,7 @@ public class SceneManagementGLTF : MonoBehaviour
}
else
{
Debug.LogWarning("Pose value type not supported yet :"+pose.Value.Type);// Todo : manage other types
Debug.LogWarning("Pose value type not supported yet :"+pose.Value.Type);// Todo : manage other types
}
}
...
...
@@ -85,14 +85,21 @@ public class SceneManagementGLTF : MonoBehaviour
/// <returns>ascync method</returns>
protectedasyncTaskLoadGltfBinaryFromMemory()
{
stringfilePath="";
if(_PathToGLTF.StartsWith("http"))
{
KeyValuePair<string,string>download=System.Threading.Tasks.Task.Run(()=>WorldAnalysisARFoundationHelper.DownloadFileHTTP(_PathToGLTF)).Result;// synchronous : not perfect at all prevent to add another mesh while bundle is downloading
filePath=download.Key;
}
else
{
#if UNITY_EDITOR
stringprefix=Application.streamingAssetsPath;
stringprefix=Application.streamingAssetsPath;
#else
stringprefix=Application.persistentDataPath;
#endif
varfilePath=prefix+"/"+_PathToGLTF;
Debug.Log("PATH : "+filePath);
#endif
filePath=prefix+"/"+_PathToGLTF;
}
byte[]data=File.ReadAllBytes(filePath);
Debug.Log("File Size "+data.Length);
...
...
@@ -121,7 +128,7 @@ public class SceneManagementGLTF : MonoBehaviour