- Home /
Is it good to use events more often?
Is it good to use public static events more frequently in my projects? Does that affect the performance? And please anybody suggest me any tutorial or link on how to manage my project, scripts, proper way of coding and communicate different objects and components so i can properly debug, manage and grow my project.
$$anonymous$$anaging growth and complexity are very deep, abstract topics. There's no prescribed approach which guarantees the "best" experience for the developer. Learning about and leveraging the strongest principles from various design strategies is the right answer to this question. Using delegates and events is a strong feature when it's appropriate, but does imply some overhead. Balancing your design strategy between convenience, performance, and sense is a career-long discovery. As your experience grows, you'll become familiar with the tools at your disposal and the strengths and weaknesses thereof. Apart from general program$$anonymous$$g "best practices", the wisest approach to a given requirement will always vary case-by-case.
So the other answer to your events question is the same answer to give anyone who asks about a specific feature: Choose the strongest feature or design archetype you can based on experience and foresight. When facing similar situations, use a similar solution. Before long, the strongest (or your favorite) approaches to various situations will become obvious to you. I think everybody learns this stuff the hard way. ;)
Thanks AlwaysSunny you helped me to sort out some confusion. It really helped and thanks again for your time. :)
Your answer
Follow this Question
Related Questions
I want to set up a custom event class in javascript. How can that be done in Unity? 0 Answers
Delegate or Event: Reacting to another object's collision functions 2 Answers
Help with multi menu closing using bool 1 Answer
How to check a value from the last frame, while using events. 1 Answer
How to create animation event at specific keyframe at runtime 2 Answers