I see that we can initialize Variable in Awake() or Start() and Awake() will be called before Start().
When shou
This topic is well described in the official docmentation (Awake and Start).
This section describes why you might need two functions:
The
Awakefunction is called on all objects in the scene before any object'sStartfunction is called. This fact is useful in cases where object A's initialisation code needs to rely on object B's already being initialised; B's initialisation should be done inAwakewhile A's should be done inStart.
The difference between Awake and Start is that Start is called only when a script is enabled.
These two functions are called before the first Update method and there is no performance difference between them. I would say that Awake is used to initialize all objects (like a constructor), and Start is used to link the objects or do something before a game starts.