public virtual void Awake() {
if (Application.isPlaying) {
if (_appDelegate != null && _appDelegate != this) {
Destroy (this.gameObject);
return;
} else {
_appDelegate = this;
}
DontDestroyOnLoad (this.gameObject);
_loopers = new List<NSLooper>();
_looperCount = 0;
registWithTarget(_window, _window.OnUpdate, _window.OnGUIUpdate);
_doseApplicationDidFinishLaunched = false;
}
if (firstPassFlag) {
//init
gameObject.transform.position = Vector3.zero;
gameObject.name = "AppDelegate";
//window
{
GameObject obj = new GameObject ();
obj.transform.parent = this.transform;
_window = obj.AddComponent<UIWindow> ();
}
//impl building
applicationRunOnceOnBuilding();
firstPassFlag = false;
}
}
#endregion