Quantcast
Channel: Answers by "ransomink"
Viewing all articles
Browse latest Browse all 80

Answer by ransomink

$
0
0
Don't use SendMessage() or BroadcastMessage(), they are extremely slow and very painful to debug because you pass in a string. They are seldom used for quick prototyping to get something up and running but not ideal for a game release. - Instead, grab a reference to the script/component that holds the method you wish to call and use that reference to call whatever method you need from the script/component. `scriptRef.MethodToCall(); ` - Use an event or delegate if you need to call multiple scripts at once to access a method...

Viewing all articles
Browse latest Browse all 80

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>