查看: 1859|回复: 9
打印 上一主题 下一主题

Flash-esque Event System for Unity part2,flash事件与unity3d事件的比较

[复制链接]

5552

主题

2

听众

8万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
11

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

跳转到指定楼层
楼主
发表于 2011-12-20 14:57:13 |只看该作者 |倒序浏览
Flash-esque Event System for Unity part2,flash事件与unity3d事件的比较-第二部分


I posted about this back in November and I just have not had the time to follow up. I happened to be over on Unity Answers yesterday and saw someone was asking for just this. I figured I should really get this up.
As I stated before, I was going to do a test project and do some profiling to see what performance demands the event system has. Here are a couple screen shots of what the project looks like:
#gallery-1 { margin: auto; } #gallery-1 .gallery-item { float: left; margin-top: 10px; text-align: center; width: 33%; } #gallery-1 img { border: 2px solid #cfcfcf; } #gallery-1 .gallery-caption { margin-left: 0; }




Editor with the sim***nning. Flaming marbles!







Game View and Profiler, you can see the light footprint.

In the Game View screenshot you can see the highlighted method in the Profiler, with how low the consumption is. If you look at the number of draw calls and polycount of the scene, you will see that the amount of performance cost going to rendering makes the event system seem non-existent.
So there you have it, your AS3 event system ported to Unity C#.
I do want to note, however, because I received a bit of criticism for doing this with “why?” so I figure I will explain -
I am from a Flash background myself, like many other Unity devs, but I am now solely a Unity developer. Being out there I see other devs trying to make the jump from Flash to Unity, I have even had to teach a few people to help them do so. I wrote this event system port to provide people making the jump with a familiar system in which to deal with events of various types. I wanted it to look almost exactly the same, given the notable differences of C# and anything ECMAScript.
I really hope that this can ease some of the strain and really get people working with Unity much faster, but I am not attempting to make a substitute for the wonderful native C# event system that is already in place. In fact, I will suggest to anyone that after they become more experienced with the language and Unity that they move to that.
With that said – you can download the Unity Package off of my server here: EQEQ Events System


Cheers!


由 uke  发表

分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2012-5-20 23:25:32 |只看该作者
有意思!学习了!
回复

使用道具 举报

1023

主题

3

听众

359

积分

设计实习生

Rank: 2

纳金币
335582
精华
0

最佳新人

板凳
发表于 2012-6-3 23:20:45 |只看该作者
读铁系缘分,顶铁系友情
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

地板
发表于 2012-6-17 23:23:02 |只看该作者
呵呵,很好,方便罗。
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

5#
发表于 2012-7-27 23:21:06 |只看该作者
很经典,很实用,学习了!
回复

使用道具 举报

462

主题

1

听众

31万

积分

首席设计师

Rank: 8Rank: 8

纳金币
2
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

6#
发表于 2012-8-3 01:41:17 |只看该作者
水……生命之源……灌……
回复

使用道具 举报

462

主题

1

听众

31万

积分

首席设计师

Rank: 8Rank: 8

纳金币
2
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

7#
发表于 2012-8-13 23:59:51 |只看该作者
有意思!学习了!
回复

使用道具 举报

   

671

主题

1

听众

3247

积分

中级设计师

Rank: 5Rank: 5

纳金币
324742
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

8#
发表于 2012-8-31 01:16:34 |只看该作者
都闪开,介个帖子,偶来顶
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

9#
发表于 2012-10-3 23:26:27 |只看该作者
加精、加亮滴铁子,尤其要多丁页丁页
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

10#
发表于 2013-3-19 23:36:10 |只看该作者
凡系斑竹滴话要听;凡系朋友滴帖要顶!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2025-7-31 23:29 , Processed in 0.099825 second(s), 28 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部