// Use this for initialization private void Start() { m_CurveGroups = GetComponentInChildren <CurveGroup>(); float halfCell = CellSize / 2; float DtAngle = Mathf.Asin(halfCell / Radio) * 2 * Mathf.Rad2Deg; m_DtAngle = DtAngle; Vector3 startPos = new Vector3(0, 0, StartZ); m_CurveGroups.InitOnce(startPos, Radio, CellSize, Offset, DtAngle); }
private void OnValidate() { if (!Application.isPlaying) { CurveGroup curveGroups = GetComponentInChildren <CurveGroup>(); float halfCell = CellSize / 2; float DtAngle = Mathf.Asin(halfCell / Radio) * 2 * Mathf.Rad2Deg; m_DtAngle = DtAngle; Vector3 startPos = new Vector3(0, 0, StartZ); curveGroups.InitOnce(startPos, Radio, CellSize, Offset, DtAngle); } }