public void CloseLogFunction() { Persona = GameObject.Find(PersonaName.text); PersonaAttribute = Persona.GetComponent <Happiness_Script>(); PersonaAttribute.PersonaLog.SetActive(false); PersonaAttribute.LogOpen = false; }
// Start is called before the first frame update void Start() { NameOnButton = this.GetComponentInChildren <TextMeshProUGUI>(); Persona = GameObject.Find(NameOnButton.text); // Gets us the Happiness Script of the target persona so we can use and manipulate it's functions PersonaAttribute = Persona.GetComponent <Happiness_Script>(); NameDisplay = Persona.GetComponent <Happiness_Script>().NameDisplay; }