Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Load file from OneDrive directory,but the ENABLE_WINMD_SURRPORT is always false

Hi
I'm trying to develop a unity application for hololens and I need to load a text file as a data source to visualize at runtime.
My toolchain:
-- Mixed Reality Toolkit v.2.0.0 RC1
-- Unity 2018.3.12f1 personal
-- Visual Studio Community 2017 (15..9.11)
-- HoloLens OS v.10.0.14393.2125
-- Windows 10 v.18362.53
--Win 10 SDK 10.0.17763.0
My Unity Player setting:
Scripting Runtime Version:.Net 4.x
Scripting Backend:IL2CPP
Api Compatibility Level:.NET 4.x

I use these code to access the fileOpenPicker component to load file,

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using System;
using UnityEngine.WSA;
using UnityEngine.UI;

if ENABLE_WINMD_SUPPORT

using Windows.Storage;
using Windows.Storage.Streams;
using Windows.Storage.Pickers;

endif

public class fileLoad : MonoBehaviour
{

if ENABLE_WINMD_SUPPORT

private FileOpenPicker openPicker;

endif

void Start()
{
    UnityEngine.Debug.LogFormat("UnityThread: {0}", Thread.CurrentThread.ManagedThreadId);

if ENABLE_WINMD_SUPPORT

    UnityEngine.WSA.Application.InvokeOnUIThread(OpenFileAsync, false);  

else

        UnityEngine.Debug.Log("ENABLE_WINMD_SUPPORT false");

endif

}

but the result was always "ENABLE_WINMD_SUPPORT false".
What can I do?

Tagged:
Sign In or Register to comment.