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 Cowboykilla · Nov 23, 2014 at 02:42 PM · javascriptcrashwebplayerchrome

Unity Web Player Crashes On Application.ExternalCall

I was in the middle of a big project when I included an Application.ExternalCall. After which, during live testing on the website, the game crashes. I decided to dig a little further and create a completely new project with the sole intent of testing the ExternalCall procedure.

 function OnGUI()
 {
     if (GUI.Button(Rect(100,100,100,100),'Test')){AttemptTest();}
 }
 
 function AttemptTest()
 {
     Application.ExternalCall('Alrt','This is a test!');
 }

Is the only script in the project. It is attached to the main camera. Then, in the .html file, I added this line after both of the other scripts are implemented.

 <script type='text/javascript'>function Alrt(val){alert(val);}</script>

I've even tried sourcing to a stored script on the web server as well.

 <script type='text/javascript' src='ecall.js'></script>


With everything done above, I verified that my google chrome is up-to-date, as well as my unity web player and unity... After running the new project online, after clicking the button, the webplayer crashes and stops responding. However, if I wait until chrome gives me an option to stop the webplayer, the alert message appears with the 'This is a test!' dialog.

Is this a bug? Or is there something that I'm completely missing?

Comment
Add comment · Show 4
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 Cowboykilla · Nov 24, 2014 at 08:18 PM 0
Share

Alright, so I performed so more testing. It appears to work in Internet Explorer and $$anonymous$$ozilla Firefox. However, It still crashes in Chrome and Opera. Any insight into this issue?

avatar image adelphiaUK · Dec 10, 2014 at 01:56 PM 0
Share

Did you get an answer to this as I'm having the same issue. I'm using Unity 4.6 and have tried IE11, Chrome (crashes), Firefox, Opera (crashes) and Safari (crashes).

avatar image Cowboykilla · Dec 13, 2014 at 05:13 PM 0
Share

No actually, I didn't receive any response from Unity. However, after about two days, I tried again and everything worked... I found it funny that a brand new project was crashing, however, the older one I was working on worked perfectly. Sorry I don't have any ideas on how to help.

avatar image adelphiaUK · Dec 13, 2014 at 08:28 PM 0
Share

I've been playing with this and I've discovered a couple of things. Firstly, it only appears to crash when you call a javascript alert i.e.:

 function showAlert(msg) {
     alert(msg);
 }

and secondly, you can not call either ExternalCall or ExternalEval from within a static function.

0 Replies

· Add your reply
  • Sort: 

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

27 People are following this question.

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

Related Questions

Unity webplayer crashing browser when it is loaded and unloaded into a page using JavaScript 0 Answers

Application.ExternalCall crashing webplayer in chrome 0 Answers

Unity Web player crashes every alternate refresh in Chrome 0 Answers

GL build won't run on Chrome 1 Answer

Chrome: Preventing Unity Plugin from Crashing if Multiple Windows w Players opened 0 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