public bool AddProfile(string book) { GameObject newprofile = Instantiate(m_profilePrefab); ProfileButtonController script = (ProfileButtonController)newprofile.GetComponent(typeof(ProfileButtonController)); script.SetButtonText(book, false); //script.AddBook("Default"); newprofile.transform.SetParent(gameObject.transform, false); return(false); }
public void AddProfileToList(UserProfile profile) { if (profile != null) { ProfileButtonController profileButton = Instantiate <ProfileButtonController> (ProfileButtonPrefab, IsProfilesContent.transform); profileButton.UpdateButton(profile); } }