Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

OnMouseDown button and the page that come after

Discussion in 'Getting Started' started by Synapz, May 1, 2015.

  1. Synapz

    Synapz

    Joined:
    Oct 2, 2014
    Posts:
    16
    Hello,

    I am making an app for mobile devices and in this app i have made several buttons like the one below \

    using UnityEngine;
    using System.Collections;
    public class LINKEDIN : MonoBehaviour {
    public void OnMouseDown ()
    {
    Application.OpenURL("http://www.linkedin.com");
    }
    }

    but when this executes it opens a website tab of the provider which is currently installed at the mobile device.
    and then there is now way back into the app.

    what i would like to see that this website opens in a readymade tab or something with a close button.
    inside this tab is the website playing and when i hit the close button you return to the app.

    Is this possible?
    if yes could you guide me in the right direction please.
    Thanks in advance.
     
  2. krougeau

    krougeau

    Joined:
    Jul 1, 2012
    Posts:
    451
    Not at all sure if it will work for you, but the only "new tab" option seems to be something like this:
    Application.ExternalEval("window.open('http://www.linkedin.com','_blank')");
    Not a function I've ever used, but I thought it might help.
     
    Sylvir likes this.
  3. Sylvir

    Sylvir

    Joined:
    Mar 21, 2015
    Posts:
    396
    are you trying to build an app for yourself that has buttons to all your social media so you can just access them all from the single app?