public void Hide()
 {
     if (_job != null)
     {
         _job.Abort();
     }
     if (_texture != null)
     {
         Texture2D.DestroyImmediate(_texture);
     }
     _job = null;
 }
 private void InitJob(int width, int height)
 {
     _textureArea.Set(_textureArea.x, _textureArea.y, width, height);
     _job           = new TextureUpdateJob();
     _initialUpdate = true;
     if (_texture == null)
     {
         CreateTexture(width, height);
     }
     if (_job != null && !_job.IsDone)
     {
         _job.Abort();
     }
 }
    private bool UpdateTextureJob()
    {
        if (_job == null)
        {
            return(false);
        }
        _job.Update();

        /*if (!CanCreatePreview())
         * {
         *
         * }*/

        if (!_job.IsDone)
        {
            return(true);
        }
        _texture = _job.Texture;
        _job.Abort();
        _job = null;
        return(false);
    }
 public GUIThreadedTexture()
 {
     _textureArea = new Rect(6, 0, 0, 0);
     _job         = new TextureUpdateJob();
 }