Game Development Reference
In-Depth Information
col.gameObject.BroadcastMessage("IHitYou");
}
Using either of the methods (as stated) is very slow. This is because it has to try and dis-
cover (under the hood) if the game object (and its children if using broadcast) has the
method first; it will then attempt to run it. As Unity will not know until your game starts
running and whether a game object will have that method, it has to perform this each and
every time you try it.
Search WWH ::




Custom Search