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
0
Question by dbr3d · Nov 03, 2019 at 11:27 AM · webglserverside

Can Unity webGL run on server side?How could i manage to do that?

I am new to WebGL and I would like to do this: I have in Unity a cube gameObject rotating around y axis and a UI text gameObject counting how many full 360 turns the cube did. The cube does a full 360 turn in 1 minute. That is done, it is not a problem. I would like to make a webGL build and start the webGL app on a server just right now. I wait 30 minutes and i vist the url in which i started the webGL app. I want to see 30 in the text field of the ui text gameObject. So time is running on the server and every time i see that web i can see the actual moment of that time flow. Questions: - Can this be done using Unity webGL build? - If so...What is the eaiest way to manage this? What unity tools or services do i need? - Could i do this uing a free server service? Could somebody point me in the right direction? Thanks a lot

Comment
Add comment · Show 1
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 thelghome · Dec 01, 2019 at 03:47 PM 0
Share

some webgl result like this? https://youtu.be/82_-a7WF3vs It's a WebGL Live Strea$$anonymous$$g demo via F$$anonymous$$ WebSocket plugin.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Bunny83 · Nov 03, 2019 at 01:34 PM

What you have described sounds a bit confusing. First of all WebGL is just a rendering solution in web browsers. They always run on the client side. Of course a WebGL build is usually hosted on a server where users can actually connect to and load that page in their browser.


Some things which are not clear and which we can not answer here since they do not belong here:

  • It's not clear if you want to have one server based time for all users which connect to your server or if you want to have a seperate "time" for each user.

  • If each user should have a seperate time it gets a bit complicated since you need some sort of user management on your server. At the same time, depending on where you live, you might get into trouble with personal data and privacy.

  • For doing serverside logic you usually implement your logic directly on the server (using PHP or another server-side scripting solution) and have your WebGL build communicate with those through UnityWebRequests.

  • We can not suggest hosting solutions for you since this would be a subjective answer and such questions / answers do not belong here since they will never be "answered". Also hosting solutions can differ heavily depending on your requirements and your location.


Note that depending on what your actual goal is you might not need serverside logic at all. You can store a timestamp in a cookie on the client side so when he loads the page again you can figure out on the client side how much time has passed. Of course this would only work if every client should have their own seperate time. If you want all clients to see the same time it has to be server-side. Also If you want to support that users can "log-in" from other locations / devices you also need a server-side solution and some kind of user accounts on your server.


Such topics are a bit too advanced to give a full example as an answer here. Besides that there are many different ways how one could accomplish such a system. Also since the actual usecase is not clear it's difficult to give a clear answer to your question.

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 dbr3d · Nov 03, 2019 at 04:11 PM

Thanks a lot for your answer @Bunny83 . I would like to add some info after reading your post. I would like to have the same flow time for all the users who conect to the server so i believe i will need server side logic, as you nicely said. I believe now that server logic can´t be a unity webgl build , but could server logic be done with unity? it should be a unity build uploaded to a server? And the last point about this problem...Could this be done without login in the client side? I mean i just type the url in which is uploaded the client as a unity webgl build, that client communicate with the server side through UnityWebRequests and i see the 3d world with the word rotating and the UI text showing number 31. In other words is it possible to conect with this 3D world in which the cube is rotating without log in any account? Thanks for your attention.

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

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

My WEBGL game is encountering issues with CORS but not other games? 2 Answers

WebGL Build throws a 404 Not Found error for UnityLoader.js on the server, what am I doing wrong? 1 Answer

Is there anyway to use WebGl on a website without having users install a plugin? 0 Answers

WebGL -Chrome seems to do nothing while loading WebGL appllication 0 Answers

webgl rotate texture on the face of cube using glmatrix 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