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.
Save a string to a text or cvs file on HoloLens
Hi everyone
I am new to programming and HoloLens development, and I am recently working on an application that requires me to store information in a text, cvs, or xml files on the HoloLens.
I am still looking into Serialization stuff in Unity (since I don't need the read function right now), so I tried to go for an easy path that is to store the data as txt format.
I am able to write a line to the console through Debug.Log (I wrote a function that will return a string) and I what I am trying to do now is to write the line into a txt file. So I guess the two questions I have are:
What is the file path on the HoloLens, am I be able to create a save information to a txt file on HoloLens? And if possible, could someone give me an example how to store it?
Could this file be opened through the whole process? I don't need to modify the file, I just need to add a new line to the file whenever I tap on the button in the application.
Thanks a lot
Answers
@Cozywolf
Maybe this post will help get you started.
Windows Holographic User Group Redmond
WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
WinHUGR YouTube Channel -- live streamed meetings
I'm looking to do the same however whenever the user gazes at an object, I would like timestamps to be created within an Excel or CSV file for when the person gazes at the object and then looks away from the object.
OnGazeEnter - timestamp enter time within the spreadsheet yyyy-mm-dd h:mm am/pm
OnGazeLeave - timestamp exit time within the spreadsheet yyyy-mm-dd h:mm am/pm.
Thanks
I kind of figured it out through some articles and trial and errors. Here is the code I have, the code will write the file to "User Files\LocalAppData[APP name]\LocalState"
@Cozywolf
Hi Cozywolf
Thank you for sharing your code. Does this code works in a master build too?
edit: actually I try to run it on a master build in a modified way and get errors. (only on master build....) does someone knows what I m doing wrong?