public static bool HasLocalData(Project project)
        {
            //TODO Need to find other way to get playerStorage or move this method to other
            var storage = new PlayerStorage(UnityEngine.Reflect.ProjectServer.ProjectDataPath, true, false);

            return(storage.HasLocalData(project));
        }
        public static Sprite LoadThumbnailForProject(Project project)
        {
            m_PlayerStorage.HasLocalData(project);
            var thumbnailPath = GetProjectThumbnailLoadPath(project);

            if (File.Exists(thumbnailPath))
            {
                var imageData = File.ReadAllBytes(thumbnailPath);
                var tex       = new Texture2D(k_ThumbnailDimension, k_ThumbnailDimension);
                if (tex.LoadImage(imageData))
                {
                    return(Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0.5f, 0.5f), 100.0f));
                }
            }
            return(null);
        }
Exemple #3
0
 public bool IsProjectAvailableOffline(Project project) => Directory.Exists(k_StorageRoot) && IsProjectAvailable(project) && m_LocalStorage.HasLocalData(project);