- Home /
Creating an app for mobile and browsers
I'm having difficulty figuring out if my idea and project is actually doable or not.
I'm planing on a project that consists of two parts.
First part is strictly a mobile app (for iOS and Android). This is where my users will have access to all kinds of information that is being read from a database. They are also able to make a few features that writes to the DB. So far I don't have a problem.
The second part of the app is the admin area. The admin area is a copy of whatever a user can do but along with a few more features (it's an admin area, so it'll be possible to do a few more writing to DB and such).
My question is: How do I create an app that works in the browser as well? Is it simply just the WebGL plugin I need or do I need some other plugins? I want to be able to use the exact same code.
Answer by GothSeiDank · Nov 02, 2017 at 06:50 PM
You simply export it the game to WebGL and put it on a server, which can be local. Yes it is that easy. For some features you might want to use Application.platform though. Have a look at this document:
https://docs.unity3d.com/ScriptReference/Application-platform.html
With the help of this, you can limit certain things to a specific platform, which is an easy way to control which platform has access to what or change certain features like controls only for a certain platform.
What will not work in a browser is stuff that is Android specific of course, like the Google Play Store API.
You might also want to make modiciations to resolution or viewport of the camera, depending on the game, but that is optional.
Interesting! Thanks a lot! :D
Yeah I guess I need to take care of resolution as well, but I see that I can now continue with my project safely. Cheers, mate!
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
App gets stuck on WebGL 0 Answers
Unity 5 2D C# interactive grass 2 Answers
unity 2D with delay run and jump 0 Answers