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 /
avatar image
1
Question by Unit_Pi · Oct 23, 2017 at 06:48 PM · unity 5webplayerwebgl

Unity WebGL build not rotating Transform.Rotation in WebPlayer

Good Afternoon Gentlemen, I was wondering If I can get any answers from you guys knowing so much more then me. I'm currently using a web-socket script to connect to my server & to cause a rotation on a gameObject. It successfully rotates with no problem when I go into game mode in Unity3D, Also When I build it to .Exe it works perfectly.

But when when I actually build to WebGL, it connects but never seems to rotate. No Idea why it works in .Exe and in Unity but not in the WebPlayer. My server says theirs a connection but I can't seem to figure out why transform.rotation doesnt work on WebGL. Any Ideas? Thanks.

Comment
Add comment · Show 2
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 Unit_Pi · Oct 23, 2017 at 06:51 PM 0
Share

Here is what I'm using.

 var rotationVector = transform.rotation.eulerAngles;
     
     rotationVector.y = float.Parse(reply);
     
     transform.rotation = Quaternion.Euler(rotationVector);

avatar image Unit_Pi · Oct 24, 2017 at 04:19 AM 0
Share

I'm currently using a package from the asset store, "Simple Web Sockets for Unity WebGL". https://www.assetstore.unity3d.com/en/#!/content/38367

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Bunny83 · Oct 24, 2017 at 03:26 AM

It's most likely a problem with your websocket. Are you sure you use an actual compatible websocket implementation? A websocket emulation that uses ,NET sockets under the hood won't work.

What websocket implementation do you use?


edit

Have you actually set Application.runInBackground to true or set it in the player settings?

Comment
Add comment · Show 1 · 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 Unit_Pi · Oct 24, 2017 at 05:33 PM 0
Share

Yup, my loop that contains my sockets wouldn't run and give a return signal to my server if it wasn't. Like I said, it works on .exe builds and in unity its just when I run in WebGL player. I needed to build in web player because that was my original plan.

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

79 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 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

Is there a way to view how the game will look before building with WebGL? 0 Answers

WebGL responsive template 0 Answers

[WEBGL] PLAYER CONTINUES TO RUN AFTER WEBGL-CONTENT IS REMOVED FROM DOM 1 Answer

WebGL error only when hosting on seperate server: An error occurred running the Unity content on this page. Could not read property length of undefined 0 Answers

How to fix the Chrome Web Player Problem 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