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 jaised · Mar 26, 2015 at 02:25 PM · unity5webglchromeextension

WebGL - Chrome Extension

Does anyone have any experience or know if it is possible to package a Unity 5 WebGL build as a chrome extension? I have a packaged game that takes a while to download on a Chromebook and was wanting to make it load faster. The only way I can think to do that is to package the WebGL build as an extension to save time from downloading the game.

Any help would be greatly appreciated. Until then I have been sifting through Google's documentation. Thank you for the aid.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by jaised · Mar 27, 2015 at 01:33 PM

I've spent a little time investigating if the WebGL platform of a Unity 5 game could be ported or packaged as a Chrome Extension or Web App - the short answer is no.

Chrome provides 2 ways for developers to administer their product to users: Chrome Extension and Chrome Web App.

Chrome Extension

The Chrome Extension is essentially a product that executes and runs in the back end. There may be a small interface that the user messes with, but all of the logic is executed behind the scenes.

Chrome Web App

The Chrome Web app is a product that has a front end and a back end - closest representation to a Unity Game -> what the Native Client build essentially was.

--Results

The Chrome Extension is undesirable as it doesn't allow the game to create a sandbox webpage (front end) to execute and actually display the game. Furthermore, a Chrome Web App is not possible either as there are security errors that are exposed in the WebGL java-script.

The most problematic issue are the numerous uses of eval throughout the Unity created WebGL java-script. In order to fix this, all instances of eval would need to be abstracted into separate functions, and reference those functions instead. Additionally, each eval instance would need to be communicated, via addEventListener or postMessage, to the game i-frame that would execute the java-script, and return the result. This could not be something that could be automated and could be very error prone if an instance were missed.

In conclusion, the WebGL platform packaged as a Chrome Web app isn't something that I would consider feasible.

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

20 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

Related Questions

Flash mouse events with WebGL in Chrome 0 Answers

Unity HTML5(WebGL) exported project not working on mobile/tablet 1 Answer

WebGL FullScreen 2 Answers

Chrome, Firefox, and NPAPI support 3 Answers

Process for converting from Web Player to WebGL 2 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