示例#1
0
    public void DisplayFullscreenImage(string fullImagePath, string thumbnailPath = null)
    {
        Start(); // starts everything up if not yet started

        _fullImageIsLoaded = false;
        if (thumbnailPath != null)
        {
            if (mainController.isOptimizedVersion)
            {
                _thumbnailImageLoader.StartLoading(thumbnailPath, this, mainController.footageThumbnailsCache, false /* !isFullImage */);
            }
            else
            {
                Texture2D texture = Utility.LoadImageFile(thumbnailPath);
                image.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0, 0));
            }
        }
        if (_fullImageLoader.loadStatus == ImageLoader.LoadStatus.Loading)
        {
            _fullImageLoader.CancelLoading();
        }
        _fullImageLoader.StartLoading(fullImagePath, this, mainController.footagePhotosCache, true /* isFullImage */);
    }