Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by Thaewyn · Jun 01, 2016 at 11:01 PM · webglbuild settings

What's the best way to include a WebGL project in a Rails app (using Rails' asset pipeline, etc)

Hey all,

I've got a relatively small Unity game, and I'm trying to export it using WebGL so it can be included in our Rails app... that said, I have no idea where to place the files or what to do with them so that they will be picked up properly. Through stabbing in the dark, I've been able to get the data/code/memUrl values to point at the files (or at least stop erroring at me), but I had to add 'gz' to the file extensions to get them picked up, so I don't know if that broke anything.

As it stands right now, I'm getting 404s for all of the loading / progress bar assets, and some JS errors like this:

 optimizing out Math.fround calls
  Invoking error handler due to
 Uncaught SyntaxError: Unexpected identifier
 blob:http%3A//localhost%3A3000/2780f0a5-af74-463d-92de-ce876dca3666:1 Uncaught SyntaxError: Unexpected identifier

Does anyone have a line on a tutorial that walks through how to include WebGL output in a Rails app? Any help would be greatly appreciated.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Thaewyn · Jun 02, 2016 at 09:30 PM

Okay, managed to make it work. There are still some hiccups, but the main thing is just getting the asset files into the right location and loading them properly with rails helper methods ("asset_path" and "javascript_include_tag" and the like), which I am much less familiar with. It's not without issues, but it at least runs for now.

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 ChaoticBoredom · Jun 23, 2016 at 09:04 PM 1
Share

@Thaewyn In order for this to be helpful, you could post where your files needed to go for this to work.

avatar image Chrishu · Oct 19, 2016 at 02:12 PM 1
Share

@Thaewyn Would you please post where your files to go. I have the same issue . Thanks!

avatar image
0

Answer by meta_monkey · Sep 27, 2018 at 10:25 PM

https://stackoverflow.com/questions/40134776/how-to-include-a-webgl-project-in-a-rails-app

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

63 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can we still upload Unity projects online or is it fully deprecated? 0 Answers

WebGL Build : Download file from Web-Service 1 Answer

Web GL Export Does Not Work in 2020.1.06b16 0 Answers

Building to Web GL fails EVERY TIME. What am I doing wrong? 0 Answers

Startup time of WebGL build 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