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.
Options

run on unity but not hololens

I get use websocket to get a coordinate data from computer and use the coordinate to controle the move of a sphere.
It run will in the unity in my computer but not in the hololens. There is no problems of websocket because I use a textmesh to show the message I get. So by the textmesh I have observe that the data has already sent to the hololens, but in the hololens, the sphere doesn't move while in the unity it do move.
The string I get is like"1.0_1.0_1.0", and I cut them by using "_", maybe UWP don't support this function?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class pre : MonoBehaviour
{


    public TextMesh tm = null;
    public GameObject sphere;
    public void ResponseToUDPPacket(string incomingIP, string incomingPort, string data)
    {
        int i;
        if (tm != null)
            tm.text = data;
        string[] centre = data.Split('_');
        i = centre.Length;
        float[] num= new float[3];

         num[0] = (float)System.Convert.ToDouble(centre[0]);
        num[1] = (float)System.Convert.ToDouble(centre[1]);
        num[2] = (float)System.Convert.ToDouble(centre[2]);

        sphere.transform.position = new Vector3(num[0], num[1], num[2]);
        var headPosition = Camera.main.transform.position;
    }
}
Sign In or Register to comment.