Unity 4.6 is (almost) here! Everyone is talking about the new uGUI, the best thing that happened to Unity since the 2D native tools. I already tried the tools and I can say they are simple and awesome, but if you already had experience with nGUI you will see little new stuff in there.
Let's better talk about something else... the new Event System and Raycasters! :)
The new uGUI elements allow to create simple conection between them and other scripts in some sort of visual scripting. Good news are that they didn't limit it to only the new uGUI elements, but they expanded it to allow any unity component to use them, it the Canvas (Graphic Raycaster), 2D (Physics 2D Raycaster) or 3D world (Physics Raycaster).
Events and Raycasters will make the life easier of both programmers and designers. |
The new event system is composed of two basic elements:
Raycaster: in this case 2D. Needs to be atached to a proper camera. |
EventTrigger: needs to be in a GameObject with a proper collider. |
Note 1: In other for this to work just like that you need to have somewhere in your scene the EventSystem component. This will happen automatically if you have any Canvas in your scene. If you don't have it, it will not work.
Note 2: Additionally to the EventSystem there is the Standalone Input for gamepads and Touch Input modules for touch screens, finally! :D
Note 3: Each of the 3 types of Raycaster needs to be atached to the camera or canvas that matches them and render the components that will receive events.
Now let's take a look of why this new feature is amazing:
Posibility of accessing any engine method and custom from your scripts! |
You can pretty much call every method with the event, it just have to follow some simple rules:
- Has to be public
- Has to return void
- Has only one parameter of type: int, float, string or Object (Monobehaviour is an Object, so any component or script is valid as a parameter)
That's it! So easy! :D
The best thing is that the possibilities are endless, right now it allows for great control without a line of code, but I am pretty sure that with the possibility of creating custom Events will enchance the possibilities of visual scripting in Unity dramatically.
Here you can see some examples of the new uGUI in movement, the drag and drop example uses some hidden events that you can receive implementing some Interface handlers, but I guess there will be more information about it in the future documentation
Here you have basic uGUI tutorials, get them while they are hot ;)
What are your thoughts about it? Do you think Unity is moving into the right direction? What else would you like to see in the engine? I would love to hear from you :)
PS: if you expected some Northwards Of Roswell update, I am still here and soon there we will be showing you the progress :)
Hi:) Can you give more examples with new event system except click handeling and drag and drop?
ReplyDeleteAfter doing a little bit of research in that area:
DeleteEvent System can be expanded via BaseInputModule class. This is useful for different kind of inputs like console controllers and touch pads (this two are already implemented).
Let's say you want to control the GUI of your game with movement based controls (like Wii), then you need to implement your specific BaseInputModule and follow the instructions in the docs.
On the other hand we have the EventTrigger, that for the moment receives 15 kind of events (all related to click and selection handling). I still haven't figured out if you can add extra events to do whatever you have in your mind. Examples could be attaching an EventTrigger to your player character to receive Events from the enemies trying to attack it.
In the worse case scenario we can still use the same function calls to do whatever we want to do, but we should be extra careful to not mess up with the intended use of that interfaces.
If I will find out the way of creating custom EventTriggers in the correct (if exists) way I will put the solution in this blog :)
Congratulations for a great post!
ReplyDeleteThis post is very helpful to me. Incall girls
ReplyDeletehow can we assign function at runtime to this. Indeed it's very helpuful
ReplyDeleteAnkara
ReplyDeleteAntalya
istanbul
Ordu
izmir
L7ZZ1
görüntülü.show
ReplyDeletewhatsapp ücretli show
YS7X
https://istanbulolala.biz/
ReplyDeleteGWİ
yalova evden eve nakliyat
ReplyDeletetunceli evden eve nakliyat
giresun evden eve nakliyat
ağrı evden eve nakliyat
van evden eve nakliyat
K4FJL
hatay evden eve nakliyat
ReplyDeleteısparta evden eve nakliyat
erzincan evden eve nakliyat
muğla evden eve nakliyat
karaman evden eve nakliyat
KBDCR
urfa evden eve nakliyat
ReplyDeletemalatya evden eve nakliyat
burdur evden eve nakliyat
kırıkkale evden eve nakliyat
kars evden eve nakliyat
8JFD3H
33166
ReplyDeletebuy deca durabolin
deca durabolin
buy dianabol methandienone
parabolan
order peptides
order steroids
anapolon oxymetholone for sale
order turinabol
buy winstrol stanozolol
9A59B
ReplyDeleteTunceli Şehirler Arası Nakliyat
Artvin Şehirler Arası Nakliyat
Iğdır Şehir İçi Nakliyat
Adana Evden Eve Nakliyat
Bitlis Parça Eşya Taşıma
Çerkezköy Kombi Servisi
Pancakeswap Güvenilir mi
Ünye Halı Yıkama
Yalova Evden Eve Nakliyat
26809
ReplyDeleteTekirdağ Fayans Ustası
Ordu Parça Eşya Taşıma
Coin Nedir
Afyon Parça Eşya Taşıma
Denizli Lojistik
Ardahan Şehir İçi Nakliyat
Kırşehir Şehir İçi Nakliyat
Ağrı Parça Eşya Taşıma
Mersin Evden Eve Nakliyat
0917C
ReplyDeleteBatıkent Boya Ustası
Bayburt Evden Eve Nakliyat
Kırşehir Evden Eve Nakliyat
Edirne Lojistik
Bartın Şehirler Arası Nakliyat
Bartın Parça Eşya Taşıma
Çanakkale Lojistik
Çerkezköy Boya Ustası
Referans Kimliği Nedir
080B1
ReplyDeleteGiresun Evden Eve Nakliyat
Cointiger Güvenilir mi
Muğla Evden Eve Nakliyat
Antalya Şehir İçi Nakliyat
Tokat Şehir İçi Nakliyat
Çerkezköy Mutfak Dolabı
Kırklareli Şehir İçi Nakliyat
Clysterum Coin Hangi Borsada
Yozgat Parça Eşya Taşıma
D643D
ReplyDeleteYalova Evden Eve Nakliyat
Ordu Şehirler Arası Nakliyat
Amasya Şehir İçi Nakliyat
Ünye Çelik Kapı
Qlc Coin Hangi Borsada
Van Şehir İçi Nakliyat
Çorlu Lojistik
Elazığ Evden Eve Nakliyat
Bee Coin Hangi Borsada
FB234
ReplyDeleteBitcoin Madenciliği Nasıl Yapılır
Kripto Para Kazanma
Bitcoin Hesap Açma
Bitcoin Yatırımı Nasıl Yapılır
Coin Nasıl Kazılır
Kripto Para Madenciliği Nasıl Yapılır
Bitcoin Kazma
resimlimag.net
Coin Çıkarma
BFF7A
ReplyDeleteBinance Madenciliği Nedir
Binance Neden Tercih Edilir
Kripto Para Nasıl Oynanır
Btcturk Borsası Güvenilir mi
Coin Kazma Siteleri
Kripto Para Kazanma Siteleri
Gate io Borsası Güvenilir mi
Kripto Para Üretme Siteleri
Coin Çıkarma
D1A57
ReplyDeletebinance referans kodu
binance referans kodu
resimli magnet
referans kimliği nedir
binance referans kodu
resimli magnet
binance referans kodu
resimli magnet
referans kimliği nedir
DA005
ReplyDeleteSoundcloud Reposts Hilesi
Parasız Görüntülü Sohbet
Apenft Coin Hangi Borsada
Binance Kaldıraçlı İşlem Nasıl Yapılır
Expanse Coin Hangi Borsada
Binance Hesap Açma
Bitcoin Çıkarma
Referans Kimliği Nedir
Görüntülü Sohbet Parasız
DFCAE
ReplyDeleteen az komisyon alan kripto borsası
bingx
kripto para nasıl alınır
lavanta sabunu
paribu
bitmex
canlı sohbet ucretsiz
bybit
canlı sohbet odaları
3DCED
ReplyDeletebitexen
binance referans kimliği nedir
ilk kripto borsası
probit
kucoin
btcturk
huobi
kaldıraç ne demek
bitexen
AB23A
ReplyDeleteen iyi kripto para uygulaması
huobi
bingx
binance
canlı sohbet siteleri
filtre kağıdı
cointiger
kripto para nereden alınır
telegram kripto para grupları
0D168
ReplyDeletetelegram kripto para grupları
bkex
mobil proxy 4g
kripto para nasıl alınır
kripto ne demek
telegram en iyi kripto grupları
bingx
bitcoin ne zaman çıktı
bitcoin hangi bankalarda var
86A77
ReplyDeletebitexen
probit
September 2024 Calendar
mercatox
poloniex
bkex
binance
mexc
filtre kağıdı
GNHCGYJVK
ReplyDeleteشركة تسليك مجاري
شركة تسليك مجاري بالخبر NFAobooVmq
ReplyDeleteصيانة افران جدة h0DKnUOtSU
ReplyDeleteشركة مكافحة الفئران بالاحساء 3cnQhHSy5x
ReplyDeleteشركة مكافحة الحمام بالاحساء UcZwf2h1qr
ReplyDelete