// Use this for initialization void Start() { character = Instantiate(character_prefab,new Vector3(0,1,0),Quaternion.identity) as GameObject; character.transform.parent = this.transform; control = character.GetComponent<Control>(); control.main = this; ingameMenu = GetComponent<IngameMenu>(); ingameMenu.main = this; stats = character.GetComponent<Stats>(); stats.statsOwner = this.transform; stats.level = 1; stats.updateStats(true); saveLoader = GetComponent<SaveLoader>(); saveLoader.main = this; if(GameObject.Find("load") != null) { saveLoader.loadGame(); Destroy(GameObject.Find("load")); } }