how slow is sending messages?

unity is a component based system , how fast is messages compared to direct access.
direct access defeats part of what component trys to solve .

plus with direct access you need to know whats is contained within the entity its self ,
i want to be able to remove AI and add in the player controls or other way around , so am i best to do the comunication with the AI/player to the entitys control system via messages or direct access , where it checks via getcomponant code

I really haven’t noticed any difference as far as speed goes, and if there is a difference, it’s probably so small you’d barely notice it.

gameObject.SendMessage is good when you don’t want to specify what object you’re sending to, that way you can just send messages a bunch or all objects and simply use DontRequireReceiver to sort it out.

However, SendMessage doesn’t allow for more than 1 parameter, so for instance, you can’t send speed and force with SendMessage but only speed or force.

Calling a function remotely with GetComponent allows you to call

GetComponent(script).DoSomething(speed, force);

Personally, I use both. For single parameter functions I use SendMessage and for multparameter I use GetComponent. It’s really up to you, as there’s pretty much no difference.