脚本/功能 Easy Threading 3.3 unity3d asset U3D插件下载

插件名称:Easy Threading 3.3插件官网:访问官网
版权协议:Red pine1.1解压密码
Easy Threading 3.3 unity3d asset U3D插件下载   unity3d插件
Easy Threading 5.0版下载链接

Easy Threading 3.3 unity3d asset U3D插件下载

Easy Threading 3.3 unity3d asset U3D插件下载












Requires Unity 5.2.2 or higher.

Work with multiple threads easily:

Documentation

Forum's thread (examples and support)

To build a truly responsive Unity game, you must keep long-running operations off of the main thread, and be careful to avoid blocking the main thread. This means you will need to execute various operations in the background.

Unity's coroutines are ALWAYS executed on the main Thread

Executing threads in the background implies carefully go back to the main thread when you have to manipulate Unity's objects.

Piece of cake with this package, just use this sentence:
Task.RunInMainThread(SomeFunction);
SomeFunction is guaranteed to be executed in the main thread

Of course i's possible to use lambda expressions:
Task.RunInMainThread
This code will execute in the main thread

But this asset also makes working with threads a pleasant experience:

To create a thread just use the following syntax:
Task.Run (DoSomeWorkOnABackgroundThread);

Creating a thread that returns some value (an integer in this example):
Task<int>.Run (CalculateSomeIntegerInTheBackground),

Of course you will want to receive the integer:
Task<int>.Run (CalculateSomeIntegerInTheBackground).ContinueWith(ThisFunctionReceivesTheIntegerAsParameter);

Or, maybe, you need to show that integer to the player (the function receiving it must be executed in the main thread):
Task<int>.Run (CalculateSomeIntegerInTheBackground).ContinueInMainThreadWith(ThisFunctionReceivesTheIntegerAsParameter);

These are just the basic features included in this package.

This package reimplements and extends the .NET System.Threading.Tasks namespace.

This namespace makes thread management easier for you by adding a class named Task. A task represents an asynchronous operation. Typically, a Task is returned from an asynchronous function and gives the ability to continue processing the result of the task.
A task is not tied to a particular threading model: it represents the work being done, not where it is executing. Tasks have many advantages over other methods of asynchronous programming such as callbacks and the event model.

You can learn more about tasks in Parse's website

Tested for standalone builds, web player, iOS and Android

Full source code is included, as well as many examples. I use this asset for my own projects, so I will keep improving and expanding it.

If you have any comments, doubts, feature requests or just need some help implementing some multithreading behaviour just let me know in the forum's thread


游客,如果您要查看本帖隐藏内容请回复

作者 微笑的猫 发表于 2015-12-4 13:17:04

choaswings

谢谢分享~~~~~~~~~~~
发表于 2015-12-14 19:51:54

yuanyuanwg

多谢楼主分享
发表于 2016-6-30 21:49:31

lab_zj

谢谢分享
发表于 2017-1-9 12:02:36

hongkong1

大爱柚子网
发表于 2017-4-24 10:24:56

henry890307


谢谢分享
发表于 2017-12-16 16:56:53

yl25349558

楼主太强力了!不得不支持啊
发表于 2020-2-27 01:25:15
您需要登录后才可以回帖 登录 | 立即注册
微笑的猫

关注1

粉丝81

发布951

热门作品推荐
glow
欧美魔幻写实策略建筑升级主城建造防御手游
glow
GUI Kit - Matt Metal 2.0.0 按钮图标UI素
glow
女性人物模型 萝莉 可爱 卡通角色max文件有
glow
Classic RPG GUI 1.1手绘中世纪MMO经典UI素
glow
Two Handed Sword Animset Pro 1.2双手持剑
glow
Girl GreatSword AnimSet 1.0动漫风格女性
glow
Mesh Simplify 1.10 Unity网格简化插件
glow
UIObject3D:Render 3D Models on any Unit
glow
黑色幸存者 Hyejin 慧珍 巫女 含骨骼动画 F
glow
Climbing System 4.0 攀爬功能