About 'SendMessage() Between Components'!

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

I appreciate this lecture, it’s new information for me and well-presented, but in my case, I’m having trouble justifying applying it just at this moment… If you care about my calculus, continue, but I suspect it’s not super-interesting (My point being, the vast difference between my source code at this stage, and where the typical student will be are probably not worth comparing).

Due to my (fairly extensive) extracurricular ventures with my “Argon Assault” source-code, I currently have 11 (no, wait… 12 now) C# files comprising about 1000 lines of source-code. After getting the BadManager.cs lesson, my _Scripts folder contains:

DamageHandler.cs
EnemyController.cs
EnergyBonus.cs
KeyValet.cs
LevelValet.cs
MusicPlayer.cs
ObjectPool.cs
ObjectSpawner.cs
PlayerController.cs
PlayerHandler.cs
ScoreController.cs
SplashController.cs

(no _Managers!) My PlayerController.cs is 371 lines right now. If I move-out the collisions code, it would be something like 358. The added complexity of a second file for just that is hard to justify when I already have a dozen files to juggle. I’ll keep pondering though if perhaps this, or maybe some other place, might provide me a good chance to apply the lesson and try to learn it a bit better.

Is using SendMessage a way of easing the gang into the methodology of events and delegates?

Sort-of but it’s string-referenced and not as flexible

Hi Ben, this is the kind of lectures I enjoy the most. I like to use unity as excuse to learn C# because it does the thing more fun, I think, but my true objetive is to learn to program well.
I not talking about learn particular syntax stuff of C#, I’m talking about principle, conventions, ways of doing thing in the most efficient/ordely manner. And this lecture is about all this stuff.
So what I would improve, well I would add more of this, maybe try to make more clear this principles with examples vs bad practices and all that stuff.
Anyway, I think this course already try to do that, not like others than only show you a piece of “code” to do the trick, but all is a mixed disordered nonesense of code lines.

Keep up the good work!

Privacy & Terms