Beispiel #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);
        }
    }
Beispiel #2
0
 public virtual void Refresh()
 {
     bTex.RefreshWebView();
 }