From e852541b554a016aabdc5b0bfd4d055b2b0871e0 Mon Sep 17 00:00:00 2001 From: TippingGame Date: Sat, 4 Jan 2025 15:56:39 +0800 Subject: [PATCH] =?UTF-8?q?1.0.90=201.=E4=BC=98=E5=8C=96=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AD=98=E5=82=A8=E5=88=A4=E7=A9=BA=EF=BC=8C?= =?UTF-8?q?2.=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91=E5=99=A8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E5=AF=BB=E6=89=BE=E8=B5=84=E6=BA=90=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E6=B2=A1=E6=9C=89=E6=B8=85=E7=A9=BA=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C3.=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=B8=AD=E7=9A=84=E4=B8=8B=E8=BD=BD=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 5 +++++ Editor/AssetManager/AssetBeDepend.cs | 10 +++------- LICENSE.md | 2 +- Runtime/Storage/StorageManager.cs | 5 +++++ Tests/CacheStorage/DemoCacheStorage.cs | 2 +- Tests/Download/DemoDownload.cs | 3 +-- Tests/Download/README.md | 3 +-- Tests/Download/README_EN.md | 3 +-- package.json | 2 +- 9 files changed, 19 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be958480..826f3887 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [1.0.90] - 2025-01-04 +1.优化本地数据存储判空 +2.修复编辑器功能,寻找资源引用没有清空数据的问题 +3.修改文档中的下载地址 + ## [1.0.89] - 2024-12-27 1.完善Module文档 diff --git a/Editor/AssetManager/AssetBeDepend.cs b/Editor/AssetManager/AssetBeDepend.cs index 43541575..cda3710a 100644 --- a/Editor/AssetManager/AssetBeDepend.cs +++ b/Editor/AssetManager/AssetBeDepend.cs @@ -6,7 +6,7 @@ namespace F8Framework.Core.Editor public class AssetBeDepend { // 存储所有依赖关系 - private static Dictionary> referenceCacheDic; + private static Dictionary> referenceCacheDic = new Dictionary>(); private static List referenceCacheList = new List(); @@ -14,12 +14,8 @@ public class AssetBeDepend private static void FindReferences() { referenceCacheList.Clear(); - if (referenceCacheDic == null) - { - referenceCacheDic = new Dictionary>(); - CollectDepend(); - } - + referenceCacheDic.Clear(); + CollectDepend(); // 获取所有选中 文件、文件夹的 GUID string[] guids = Selection.assetGUIDs; foreach (var guid in guids) diff --git a/LICENSE.md b/LICENSE.md index e96d8615..ca904f42 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023-2024 TippingGame tippinggame@163.com +Copyright (c) 2023-2025 TippingGame tippinggame@163.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Runtime/Storage/StorageManager.cs b/Runtime/Storage/StorageManager.cs index f0952a4b..8a7e8060 100644 --- a/Runtime/Storage/StorageManager.cs +++ b/Runtime/Storage/StorageManager.cs @@ -84,6 +84,11 @@ public T GetObject(string key, bool user = false) /// 要写入的对象。 public void SetObject(string key, T obj, bool user = false) { + if (obj == null) + { + LogF8.LogError("本地数据存入对象不能为空"); + return; + } PlayerPrefs.SetString(GetKeywords(key, user), Util.LitJson.ToJson(obj)); } diff --git a/Tests/CacheStorage/DemoCacheStorage.cs b/Tests/CacheStorage/DemoCacheStorage.cs index 0a5640ac..c6d9d83d 100644 --- a/Tests/CacheStorage/DemoCacheStorage.cs +++ b/Tests/CacheStorage/DemoCacheStorage.cs @@ -7,7 +7,7 @@ namespace F8Framework.Tests { public class DemoCacheStorage : MonoBehaviour { - string url = "https://raw.githubusercontent.com/TippingGame/F8Framework/main/Tests/AssetManager/ui_20240216212631.png"; + string url = "https://raw.githubusercontent.com/TippingGame/F8Framework/refs/heads/main/Tests/Logo.png"; void Start() { diff --git a/Tests/Download/DemoDownload.cs b/Tests/Download/DemoDownload.cs index 3ee3906b..3cb55ca8 100644 --- a/Tests/Download/DemoDownload.cs +++ b/Tests/Download/DemoDownload.cs @@ -10,8 +10,7 @@ public class DemoDownload : MonoBehaviour { private string[] fileInfos = new[] { - "https://raw.githubusercontent.com/TippingGame/F8Framework/main/Tests/AssetManager/ui_20240216212631.png", - "https://raw.githubusercontent.com/TippingGame/F8Framework/main/Tests/AssetManager/ui_20240205230012.png" + "https://raw.githubusercontent.com/TippingGame/F8Framework/refs/heads/main/Tests/Logo.png" }; private Downloader downloader; diff --git a/Tests/Download/README.md b/Tests/Download/README.md index b9f306d0..75801066 100644 --- a/Tests/Download/README.md +++ b/Tests/Download/README.md @@ -16,8 +16,7 @@ Unity F8 Download组件,支持localhost与http地址文件的下载,可**本 ```C# private string[] fileInfos = new[] { - "https://raw.githubusercontent.com/TippingGame/F8Framework/main/Tests/AssetManager/ui_20240216212631.png", - "https://raw.githubusercontent.com/TippingGame/F8Framework/main/Tests/AssetManager/ui_20240205230012.png" + "https://raw.githubusercontent.com/TippingGame/F8Framework/refs/heads/main/Tests/Logo.png" }; private Downloader downloader; diff --git a/Tests/Download/README_EN.md b/Tests/Download/README_EN.md index 8a368488..fbb51400 100644 --- a/Tests/Download/README_EN.md +++ b/Tests/Download/README_EN.md @@ -16,8 +16,7 @@ Unity F8 Download组件,支持localhost与http地址文件的下载,可**本 ```C# private string[] fileInfos = new[] { - "https://raw.githubusercontent.com/TippingGame/F8Framework/main/Tests/AssetManager/ui_20240216212631.png", - "https://raw.githubusercontent.com/TippingGame/F8Framework/main/Tests/AssetManager/ui_20240205230012.png" + "https://raw.githubusercontent.com/TippingGame/F8Framework/refs/heads/main/Tests/Logo.png" }; private Downloader downloader; diff --git a/package.json b/package.json index 73cb47a7..d769bf18 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "com.tippinggame.f8framework", "displayName": "F8Framework", "description": "Unity F8Framework Core", - "version": "1.0.89", + "version": "1.0.90", "unity": "2021.3", "license": "MIT", "keywords": ["Unity", "Framework", "Core"],