I need to upload files, scenes and play animations in streams. Tried to upload files via www to Android ... how to do other things through streams? But why does the game engine not allow us to create threads? or is my understanding wrong? How to create threads in UNITY3D?
You can use threads in Unity, but the mechanism is not thread safe. Usually, you start separate threads (from the Unity user interface) to perform lengthy processes and check the results (you cannot interact with Unity from a workflow). A general approach is to use a class that represents a thread job that will be initialized by the Unity main thread. Then you start the workflow on a function of this class and let it do the job (Coroutines run in the main Unity thread, so they are not real threads. The best article on Coroutines is here )
Here is an example of the approach described above (see accepted answer):
http://answers.unity3d.com/questions/357033/unity3d-and-c-coroutines-vs-threading.html
UnityGems, , (, ). .
. !
Unity / , - Unity api. , , gameObject . , , . ! , .
Unity3D Approach, Coroutines.
IEnumerator DoSth() { ... yield retrun ... ; }
/ :
StartCoroutine(DoSth()); // OK StartCoroutine("DoSth"); // Also fine StopCoroutine("DoSth"); // You can stop it as well
Source: https://habr.com/ru/post/1529711/More articles:What is the reason that programming languages simply allow a single method to return a value? - javaSWRevealViewController how to remove gestures - iosКак читать целое число из двоичного файла, используя fread? - cJade и jQuery вместе - javascriptLaravel, using packages with PSR-4, gives the message "No hint path defined for" - phpDependency injection in maven plugin - javaОбработка отношения "многие к одному" в MVC 4 ASP.NET - c#Disable TreeView Node Focus Cue - c #Resource exception not found for selector.xml - androidJavaScript API call caching - javascriptAll Articles