Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Blue Brain · Dec 01, 2010 at 08:24 PM · windowbrowserlinktabanother

Place a link in another browser window.

Hi, how you could put the code to put a URL link that will load in another browser tab.

Thanks

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by diabloroxx · Dec 01, 2010 at 08:33 PM

Check Application.OpenURL

function Start () {
    Application.OpenURL ("http://unity3d.com/");
}
Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Blue Brain · Dec 01, 2010 at 08:48 PM 0
Share

Thanks, the problem is that it opens the link in the same tab.

What I seek is a link that will open in a different tab.

avatar image diabloroxx · Dec 01, 2010 at 09:12 PM 0
Share

You can write a Javascript function on the Browser to open a url in a separate window. You can use Application.ExternalCall to call that function from Unity3d. Hope that helps. http://unity3d.com/support/documentation/ScriptReference/Application.ExternalCall.html

avatar image
1

Answer by explrcre8 · Dec 02, 2010 at 03:19 PM

the link above to Application.ExternalCall is a good solution. For example, in your OnMouseDown function call

Application.ExternalCall ("openNewURL");

Then in the HTML call the JS function as:

<script type="text/javascript">
function openNewURL()
{
window.open('http://someURL.com', 'open_window')
}
</script>

That should do the trick. I was looking for the exact same solution to use the browser to download a .pdf from a GUIButton.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Blue Brain · Dec 02, 2010 at 12:09 AM

Thanks diabloroxx,

But I want a link _blank "(open in the next tab on the browser)

I have this:

Start function () { / / Start a download of The Given URL var www: WWW = new WWW (url);

/ / Wait for download to complete www yield;

/ / Assign texture renderer.material.mainTexture = www.texture;

}

OnMouseDown function () { Application.OpenURL (http://unity3d.com/ "); }

but it opens in the same game window.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Link to another browser tab 0 Answers

What would be needed for a link in browser to start Unity with the player in a specific location? 1 Answer

Game pauses when user changes browser tab (even with RunInBackground) 1 Answer

Are dockable windows possible in-game. 2 Answers

WebGL - Open URL in new tab? 10 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges