public void Start() { UpdateDll main = GameObject.Find("Main").GetComponent <UpdateDll>(); slider.value = 0; main.progress += Progress; }
// Use this for initialization private void Awake() { DontDestroyOnLoad(this.gameObject); updateDll = GetComponent <UpdateDll>(); if (instance == null) { instance = this as Main; } else { Destroy(gameObject); } }