Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
adamroszy's avatar
adamroszy
Honored Guest
10 years ago

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 ?

6 Replies

Replies have been turned off for this discussion
  • 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;
    }
  • Shouldn't this line:

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


    Be using GetKeyUp?
  • 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.
  • 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.