What you can not do with Unity WebGL

It is G of Tokyo head office.

UnityButWebGLIt took about a while since I corresponded, but it seems to be relatively infrequent Japanese information about WebGL today.

Today is in the range I went through,Unity WebGLI would like to put together "What I can not do" with.

Version isUnity 5.3.2 f 1Has become.

unity

Basic information

WebGL In starting development at

http://docs.unity3d.com/en/current/Manual/webgl-gettingstarted.html

In addition, other information that you should basically knowUnityIn the manual

Information by Platform → WebGL → WebGLIn starting development at

You can confirm by expanding child nodes of.

Also, due to the convenience of using a browser as an operating platform

Information by Platform → WebPlayer

http://docs.unity3d.com/en/current/Manual/Web.html

There is also a common item with, so I think that it is better to read this child node and below.

Unity WebGLThings to do in

Many basic items that Unity can do with application output can be used.

· Graphics drawing (3D / 2D)

· Receiving input (keyboard/mouse)

· Basic operations such as playing and stopping sound

·HTTP / HTTPScommunication(WWWClass only)

· Asset bundle

Such.

Unity WebGLWhat you can not do

As mentioned above, I can do many thingsUnityofWebGLHowever, due to the fact that the platform is a browser, there are some problems that can not be avoided.

Also, create a plug-HTML5There are things that can be avoided by implementing behavior that conforms to specifications,JavaScriptWhenHTML5It is necessary to be proficient in.

● CommunicationHTTP / HTTPSI can not use anything other than

Once,FTPCommunication can also be done, but reception is only possible here.

AlsoUnityEngine.WWWNetwork functions other than classes can not be used fundamentally.

● Communication data can not be used in stream format

Communication isHTTPWe can not use the data until the response is completely returned.

In other words, you can not use the downloaded part while already downloading, etc.

● Only data on the same host can be accessed

fundamentallyWWWThe data that can be read by the class must be data in the same host.

this isWebGLIn the versionWWWThe implementation of the classXMLHttpRequest ,XMLHttpRequestIs due to compliance with the same origin policy as a security problem.

In this regardUnityIt is impossible to solve by the correspondence on the side, and whether to place data in the same host,Cross-Origin Resource Sharing (CORS) Correctly on the server side can solve it.

● Processing using threads can not be performed

I can not use threads.

However, basicallyUnityEngineClass groups can not perform operations other than the main thread.

If it is absolutely necessary to do similar processing, it is necessary to avoid it by using a coroutine.

● Because there is no file system, files and directories can not be used

There is no way to access the file from the browser.

These are the futureHTML5There is a possibility that it can be solved by adding related technical specifications.

When dealing with the current situation,Indexed DBIf you create a virtual file system with, etc., it is possible to construct a file system virtually.

● I can not input Japanese from the keyboard

uGUIJapanese input can not be done from the keyboard in the input field.

This isIMEBecause the browser is controlling, from the application sideIMEThere is no way to control.

HTMLofTextFieldIt is necessary to deal with such as substituting with etc.

Finally

As for the above impossible thing, it is impossible "at the stage of examining" to the last.

From now on,HTML5Extension ofUnityThese actions may be possible by the side action.

Although it seems to be still on the day that you can build with the same source without thinking about anything from application or browser.