public void UpdateMesh(Matrix4x4 matrix, List <TreeMaterial> materials, List <TreeVertex> verts, List <TreeTriangle> tris, List <TreeAOSphere> aoSpheres, int buildFlags, float adaptiveQuality, float aoDensity) { int seed = UnityEngine.Random.seed; RingLoop.SetNoiseSeed(this.root.seed); this.ClearReferences(); this.ValidateReferences(); this.root.UpdateSeed(); this.root.SetRootMatrix(matrix); this.root.UpdateDistribution(false, true); this.root.UpdateParameters(); if ((buildFlags & 1) != 0) { this.root.BuildAOSpheres(aoSpheres); } this.root.UpdateMesh(materials, verts, tris, aoSpheres, buildFlags, this.root.adaptiveLODQuality, this.root.aoDensity); this.ClearReferences(); UnityEngine.Random.seed = seed; }