public string GetText() { string text = this.transform.GetChild(1).GetComponentInChildren <TextMeshProUGUI>().text; switch (state) { case VariableManager.StructureType.Array: return(text + "[" + vet.GetActiveText() + "]"); case VariableManager.StructureType.Matriz: return(text + "[" + vet.GetActiveText() + "]" + "[" + mat.GetActiveText() + "]"); case VariableManager.StructureType.Variable: return(text); } return(null); }
public void OnButtonPressed() { string sendText = varName.text; if (vet.gameObject.activeSelf) { sendText = sendText + vet.GetActiveText(); } if (mat.gameObject.activeSelf) { sendText = sendText + mat.GetActiveText(); } pad.InsertToOperation(sendText); }