Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
8
Question by Jean-Fabre · Nov 02, 2010 at 08:15 AM · webplayeropenurl

Application.OpenURL (); on webplayer to open in a new tab or "_blank"

Hi,

Within web player, the OpenUrl() is sadly lacking the option to define the Target so that we can open a new tab or a new page instead of replacing the content.

Is there a way to do that straight or should I implement this via Application.ExternalCall and write a litle function in javascript?

bye,

Jean

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

5 Replies

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

Answer by jonas-echterhoff · Nov 02, 2010 at 08:48 AM

There is no built-in support for this, so yes, you need to implement this using Application.ExternalCall.

Comment
Add comment · Show 3 · 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 Jean-Fabre · Nov 02, 2010 at 11:21 AM 9
Share

here is what I use then:

Application.ExternalEval("window.open('http://your site.com','Window title')");

then you don't need any javascript function in your page for that, also setting the window title will prevent opening several time the same page if the user clicks several times.

avatar image ruben_hiet · May 14, 2011 at 05:23 PM 0
Share

Works great for me with ExternaEval :) thanks!

avatar image Ninh · Oct 16, 2013 at 09:04 AM 0
Share

I can use Application.ExternalEval with Flash platform. Is there any other way to do this?

avatar image
3

Answer by codestage · May 21, 2015 at 06:15 PM

Still not possible. Unity 5.1

:)

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
2

Answer by BenoitFreslon · Aug 21, 2014 at 08:28 AM

Still not possible. Unity 4.5

:(

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
2

Answer by Fliperamma · Oct 28, 2015 at 07:45 PM

This is terrible!

Please, vote on Unity's feedback website: https://feedback.unity3d.com/suggestions/target-parameter-for-application ... but don't rise your expectations, this suggestion is there for FIVE years now :(

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 forerun · Jun 11, 2020 at 09:38 AM

use the method here http://va.lent.in/opening-links-in-a-unity-webgl-project/ and add ontouchend to your jslib file, should look like this...

 var OpenWindowPlugin = {
     openWindow: function(link)
     {
         var url = Pointer_stringify(link);
         document.onmouseup = function()
         {
             window.open("http://www.xenz.org");
             document.onmouseup = null;
         }
         var url = Pointer_stringify(link);
         document.ontouchend = function()
         {
             window.open("http://www.xenz.org");
             document.ontouchend = null;
         }
     }
 };
 
 mergeInto(LibraryManager.library, OpenWindowPlugin);

always a pleasure ;)

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Minimize MacOSX fullscreen and open URL 1 Answer

Updating txt from an url (webplayer) 0 Answers

Load image from url in Webplayer 1 Answer

Application.OpenURL() Rapid Opening 1 Answer

Open AND CLOSE webpage 1 Answer


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