//Define event actions IEnumerator Appear() { graph = Instantiate(graphPrefab); graph.transform.localPosition = new Vector3(-6, 0, 0); graph.transform.localRotation = Quaternion.Euler(0, 0, 0); graph.Initialize( xTicStep: 2, xMax: 10, yMax: 12, zTicStep: 5, zMin: -5, zMax: 5, xAxisLength: 3, yAxisLength: 3, zAxisLength: 2, scale: 2, //True length is the axis length times scale. Scale controls thickness xAxisLabelPos: "along" ); graph.ScaleUpFromZero(); yield return(new WaitForSeconds(1)); text1.tmpro.text = "Sample text"; //text1.transform.parent = graph.transform; text1.tmpro.alignment = TextAlignmentOptions.Center; text1.transform.localPosition = new Vector3(4.5f, 2, 0); text1.SetIntrinsicScale(1f); text1.ScaleUpFromZero(); }
//Example of a custom IEnumerator for kicking off common animations you might not want //to wait for during SceneBlock IEnumerators IEnumerator ChangeText(PrimerText t, string newString) { t.ScaleDownToZero(); yield return(new WaitForSeconds(0.5f)); t.tmpro.text = newString; t.ScaleUpFromZero(); }