public void readPrimaryStats(){ if(fighter == null) { fighter = (Fighter) GameObject.FindObjectOfType (typeof (Fighter)); } sorcerer = (Sorcerer)SorcererInstanceManager.getSorcerer (); // sorcerer = (Sorcerer) GameObject.FindObjectOfType (typeof (Sorcerer)); sorcerer.setIntelligence((int) PlayerPrefs.GetInt("Intelligence")); sorcerer.setWisdom((int) PlayerPrefs.GetInt("Wisdom")); sorcerer.setSpirit((int) PlayerPrefs.GetInt("Spirit")); sorcerer.calculateNewPrimaryStats(); sorcerer.calculateSecondaryStats(); sorcerer.calculateLevel(); sorcerer.calculateNextLevelXP(); }