public void Hide() { if (_job != null) { _job.Abort(); } if (_texture != null) { Texture2D.DestroyImmediate(_texture); } _job = null; _textureArea.Set(_textureArea.x, _textureArea.y, 0, 0); }
private bool UpdateTextureJob() { if (_job == null) { return(false); } _job.Update(); if (!_job.IsDone) { return(true); } _texture = _job.Texture; LowestValue = _job.ResultLowestValue; HighestValue = _job.ResultHighestValue; ElapsedMillis = _job.ElapsedMillis; _job.Abort(); _job = null; return(false); }
public void StartTextureUpdateJob(int width, int height, AbstractTextureJob job) { StartTextureUpdateJob((int)_textureArea.x, (int)_textureArea.y, width, height, job); }
public void StartTextureUpdateJob(int x, int y, int width, int height, AbstractTextureJob job) { _job = job; InitJob(x, y, width, height); _job.Start(); }
public GUIThreadedTexture(AbstractTextureJob job) { _textureArea = new Rect(6, 0, 0, 0); _job = job; }
public GUIThreadedTexture() { _textureArea = new Rect(6, 0, 0, 0); _job = new HeightMapUpdateJob(); }