Skip to main content
Participant
August 18, 2015

Global Menu not working correctly

Hi,
I have a problem with oculus global menu sample from sdk.
Whenever I'm getting back from menu to the main application- loading circle is still visible.
And long press is not working, until making short tap before.

Has any one experience those problems ?
    This topic has been closed for replies.

    6 replies

    adamroszyAuthor
    Participant
    August 18, 2015
    And here's core code from the sdk:

    public void Awake()
    {
    loading = false;
    instantiatedCursorTimer = Instantiate(cursorTimer) as GameObject;
    if (instantiatedCursorTimer != null)
    {
    cursorTimerMaterial = instantiatedCursorTimer.GetComponent<Renderer>().material;
    cursorTimerMaterial.SetColor ( "_Color", cursorTimerColor );
    instantiatedCursorTimer.GetComponent<Renderer>().enabled = false;
    }
    }

    public void Update()
    {
    loading = false;
    if (Input.GetKeyDown(KeyCode.Escape)) timestamp = Time.time;

    if (Input.GetKey(KeyCode.Escape))
    {
    loading = true;
    }

    if (loading)
    {
    instantiatedCursorTimer.GetComponent<Renderer>().enabled = true;
    if (Time.time > timestamp + minpress)
    {
    timestamp = 9999;
    loading = false;
    OVRManager.PlatformUIGlobalMenu();
    }
    }
    else instantiatedCursorTimer.GetComponent<Renderer>().enabled = false;
    }
    Inspiring
    August 18, 2015
    Shouldn't this line:

    if (Input.GetKey(KeyCode.Escape))
    {
    loading = true;
    }


    Be using GetKeyUp?
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    adamroszyAuthor
    Participant
    August 18, 2015
    No- my intention was to keep loading true as long, as we hold it down - to maintain some other action with it further.

    Besides that, I decided not to use KeyUp, because sometimes ( randomly I would say ) it wasn't working correct.
    adamroszyAuthor
    Participant
    August 18, 2015
    If you could take a look at GlobalMenu_Sample in SDK and confirm it does work for you it would be great.

    Btw. I was trying to solve this issue booth with Unity 5.1.1 nad 5.1.2.
    Inspiring
    August 18, 2015
    What specific version of Unity are you using?
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    adamroszyAuthor
    Participant
    August 18, 2015
    5.1.1p2
    And the same problem with 5.1.2