- Home /
Good design patters for events?
Whats a good design patter to read up on when working with C# events. I don't know how to use events yet but I am wanting to learn. I will need to understand the design process in using events and how you set them up and work with them.
Currently I am going to use this event system. Event System
Any info on how to use that event system would be nice also, since I don't know how to get started with it at the moment. Maybe because I need to know the design pattern and ways to use it in unity. Thanks!
I suggest you first learn how to use it, because most of the time, in doing so, you come up with the best "design patters" for their usage.
Well any info on how to use that event system? Should I start with that one, which I don't understand or start with the built in .Net event system which has more tuts?
You could read this http://unitygems.com/getcomponent-vs-event/ it might not be perfect (still working on it) but it could be a way to start with event and unity.
@cj31387 I suggest you go through every event system and learn how to use it, then you can be sure when you decide on which one to use, that your decision is the right one. If you do this, it really doesn't matter where you start, as all will have the same outcome ;)
Answer by BobbyDoogle · Mar 17, 2014 at 08:13 PM
Although incredibly simple, after reading 5 or so tutorials I found the following to be fantastic, after getting this working just like instructed, I was able to modify the mouse events into other useful types (like key presses, etc.):
http://www.everyday3d.com/unity3d/events/EventDispatcher.cs.txt
Your answer