Пример #1
0
 public void Hide()
 {
     if (_job != null)
     {
         _job.Abort();
     }
     if (_texture != null)
     {
         Texture2D.DestroyImmediate(_texture);
     }
     _job = null;
     _textureArea.Set(_textureArea.x, _textureArea.y, 0, 0);
 }
Пример #2
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);
        }
Пример #3
0
 public void StartTextureUpdateJob(int width, int height, AbstractTextureJob job)
 {
     StartTextureUpdateJob((int)_textureArea.x, (int)_textureArea.y, width, height, job);
 }
Пример #4
0
 public void StartTextureUpdateJob(int x, int y, int width, int height, AbstractTextureJob job)
 {
     _job = job;
     InitJob(x, y, width, height);
     _job.Start();
 }
Пример #5
0
 public GUIThreadedTexture(AbstractTextureJob job)
 {
     _textureArea = new Rect(6, 0, 0, 0);
     _job         = job;
 }
Пример #6
0
 public GUIThreadedTexture()
 {
     _textureArea = new Rect(6, 0, 0, 0);
     _job         = new HeightMapUpdateJob();
 }