void Update() { EnsureJobDataAllocated(); UpdateJobQueryPositions(); ShapeGerstnerJobs.UpdateQueryPoints(_guid, this.transform, _queryPositions); }
private void Update() { if (LocalQueryPositions.Length != this.ResultsHeight.Length) { this.ResultsHeight = new float[LocalQueryPositions.Length]; } ShapeGerstnerJobs.CompleteJobs(); ShapeGerstnerJobs.RetrieveResultHeights(guid, ref ResultsHeight); if (ShowDebug) { for (int i = 0; i < ResultsHeight.Length; i++) { Vector3 point = this.transform.TransformPoint(LocalQueryPositions[i]); point.y = ResultsHeight[i]; Draw3DCross(point, Color.magenta, Spacing / 2); } } // Schedule the next rounds jobs since the data is a frame old ShapeGerstnerJobs.UpdateQueryPoints(guid, this.transform, LocalQueryPositions); }