예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        sphereLeft  = GameObject.Find("S-Left").GetComponent <VRRecenter>();
        sphereRight = GameObject.Find("S-Right").GetComponent <VRRecenter>();

        Debug.Log("Starting OSC Server on port 9000");
        server = new OscServer(9000);
        // server.MessageDispatcher.AddCallback("/cmd", CmdMsgCallback);
        server.MessageDispatcher.AddCallback("/cmd", this.CmdMsgCallback);
    }
예제 #2
0
    public void Init()
    {
        if (mVRInput == null)
        {
            mVRInput = gameObject.AddComponent <VRInput>();
        }
        if (mVREyeRaycaster == null)
        {
            mVREyeRaycaster = gameObject.AddComponent <VREyeRaycaster>();
        }
        if (mVRRecenter == null)
        {
            mVRRecenter = gameObject.AddComponent <VRRecenter>();
        }

        mVREyeRaycaster.InitInput(mVRInput);
        SetupVR();
    }