What slows down my game?

Hi,
This is gonna be a very general / conceptual question so please tell me if I should move this to the forum.

I want to learn how to optimize my game in terms of efficiency. The things I want to learn is:

  • Which is costly: Memory or computation?
  • Accessing a public variable of another script in Update, or storing it into a local variable and use it?
  • Few long functions or more short functions? Or does it not matter?
  • Public variables or private variables?

Where can I find answers to such questions? Thanks !

http://wiki.unity3d.com/index.php/General_Performance_Tips

nuff said :smiley: