public void Generate(int seed) { mg.Clear(); var oldRandom = Random.state; Random.InitState(seed); Quaternion baseRotation = Quaternion.identity; //float startTime = Time.realtimeSinceStartup; GenerateSegment(Vector3.zero, baseRotation, Growth, null); mg.BuildAndAssign(); Random.state = oldRandom; //float elapsedMs = (Time.realtimeSinceStartup - startTime) * 1000; //Debug.Log($"plant generated in {elapsedMs:F2}ms"); }