Ejemplo n.º 1
0
    private bool gotMouseDown = false; // make sure we get the down and up for a refresh.

    void OnGUI()
    {
        if (screenToRefresh != null && Event.current != null && gotMouseDown && Event.current.type == EventType.MouseUp && MouseHelpers.GetCurrentGameObjectHit() == gameObject)
        {
            gotMouseDown = false;
            if (browserTexture == null)
            {
                browserTexture = screenToRefresh.GetComponent <CollabBrowserTexture>();
            }
            if (browserTexture != null)
            {
                browserTexture.RefreshWebView();
            }
            SoundManager.Inst.PlayClick();
        }
        if (Event.current != null && Event.current.type == EventType.MouseDown)
        {
            gotMouseDown = (MouseHelpers.GetCurrentGameObjectHit() == gameObject);
        }
    }
Ejemplo n.º 2
0
 public virtual void Refresh()
 {
     bTex.RefreshWebView();
 }