Compare commits

...

9 Commits
1.0.0 ... 1.0.1

Author SHA1 Message Date
hevinci
d8b1396641 Update CHANGELOG.md 2022-04-07 10:28:59 +08:00
hevinci
ef46b4365d Update LICENSE 2022-04-07 10:28:47 +08:00
hevinci
0d7c93ac55 Update EditorTools.cs
修复Assets目录下存在多个YooAsset同名文件夹时,工具窗口无法显示的问题。
修复通过Packages导入YooAsset,工具窗口无法显示的问题。
2022-04-07 10:17:42 +08:00
hevinci
25088918d3 Update README.md 2022-04-06 16:51:50 +08:00
hevinci
bed435794e Update document 2022-04-06 14:58:59 +08:00
hevinci
ca6b6899a5 Update package.json 2022-04-06 14:50:30 +08:00
hevinci
33a0f7023c Update README.md 2022-04-06 14:50:24 +08:00
hevinci
60509a4a22 Update document 2022-04-06 14:50:21 +08:00
hevinci
4b39af0543 Update document 2022-04-06 14:34:30 +08:00
9 changed files with 105 additions and 38 deletions

View File

@@ -2,5 +2,13 @@
All notable changes to this package will be documented in this file. All notable changes to this package will be documented in this file.
## [v1.0.0-preview] - 2022-04-05 ## [1.0.1] - 2022-04-07
### Fixed
- 修复Assets目录下存在多个YooAsset同名文件夹时工具窗口无法显示的问题。
- 修复通过Packages导入YooAsset工具窗口无法显示的问题。
## [1.0.0] - 2022-04-05
*Compatible with Unity 2019.4* *Compatible with Unity 2019.4*

View File

@@ -15,7 +15,7 @@ namespace YooAsset.Editor
/// </summary> /// </summary>
public static class EditorTools public static class EditorTools
{ {
#region Assembly #region Assembly
/// <summary> /// <summary>
/// 调用私有的静态方法 /// 调用私有的静态方法
/// </summary> /// </summary>
@@ -49,9 +49,9 @@ namespace YooAsset.Editor
} }
return methodInfo.Invoke(null, parameters); return methodInfo.Invoke(null, parameters);
} }
#endregion #endregion
#region EditorUtility #region EditorUtility
/// <summary> /// <summary>
/// 搜集资源 /// 搜集资源
/// </summary> /// </summary>
@@ -156,9 +156,9 @@ namespace YooAsset.Editor
{ {
EditorUtility.ClearProgressBar(); EditorUtility.ClearProgressBar();
} }
#endregion #endregion
#region EditorWindow #region EditorWindow
public static void FocusUnitySceneWindow() public static void FocusUnitySceneWindow()
{ {
EditorWindow.FocusWindowIfItsOpen<SceneView>(); EditorWindow.FocusWindowIfItsOpen<SceneView>();
@@ -188,9 +188,9 @@ namespace YooAsset.Editor
System.Type T = Assembly.Load("UnityEditor").GetType("UnityEditor.ConsoleWindow"); System.Type T = Assembly.Load("UnityEditor").GetType("UnityEditor.ConsoleWindow");
EditorWindow.GetWindow(T, false, "Console", true); EditorWindow.GetWindow(T, false, "Console", true);
} }
#endregion #endregion
#region #region
private static MethodInfo _clearConsoleMethod; private static MethodInfo _clearConsoleMethod;
private static MethodInfo ClearConsoleMethod private static MethodInfo ClearConsoleMethod
{ {
@@ -213,9 +213,9 @@ namespace YooAsset.Editor
{ {
ClearConsoleMethod.Invoke(new object(), null); ClearConsoleMethod.Invoke(new object(), null);
} }
#endregion #endregion
#region #region
/// <summary> /// <summary>
/// 创建文件所在的目录 /// 创建文件所在的目录
/// </summary> /// </summary>
@@ -409,9 +409,9 @@ namespace YooAsset.Editor
else else
return Encoding.UTF8.GetString(bytes.ToArray()); return Encoding.UTF8.GetString(bytes.ToArray());
} }
#endregion #endregion
#region #region
private static string YooAssetPath; private static string YooAssetPath;
/// <summary> /// <summary>
@@ -430,26 +430,40 @@ namespace YooAsset.Editor
if (string.IsNullOrEmpty(YooAssetPath) == false) if (string.IsNullOrEmpty(YooAssetPath) == false)
return YooAssetPath; return YooAssetPath;
string packagesPath = ("Packages/com.tuyoo.yooasset/README.md"); // 从Pakcages目录下搜索
string packagesPath = ("Packages/com.tuyoogame.yooasset/README.md");
var obj = AssetDatabase.LoadAssetAtPath(packagesPath, typeof(TextAsset)); var obj = AssetDatabase.LoadAssetAtPath(packagesPath, typeof(TextAsset));
if(obj != null) if (obj != null)
{ {
YooAssetPath = "Packages/com.tuyoo.yooasset/"; YooAssetPath = "Packages/com.tuyoogame.yooasset/";
return YooAssetPath; return YooAssetPath;
} }
// 从Assets目录下搜索
string[] allDirectorys = Directory.GetDirectories(Application.dataPath, "YooAsset", SearchOption.AllDirectories); string[] allDirectorys = Directory.GetDirectories(Application.dataPath, "YooAsset", SearchOption.AllDirectories);
if (allDirectorys.Length == 0) if (allDirectorys.Length == 0)
{ {
Debug.LogError("Not found YooAsset Folder!"); Debug.LogError("Not found YooAsset Package !");
return string.Empty; return string.Empty;
} }
if (allDirectorys.Length > 1)
string targetDirectory = string.Empty;
foreach (var directory in allDirectorys)
{ {
Debug.LogError("Found multiple YooAsset Folders!"); string asmdefFilePath = $"{directory}/Editor/YooAsset.Editor.asmdef";
if (File.Exists(asmdefFilePath))
{
targetDirectory = directory;
break;
}
}
if (string.IsNullOrEmpty(targetDirectory))
{
Debug.LogError("Should never get here !");
return string.Empty; return string.Empty;
} }
YooAssetPath = AbsolutePathToAssetPath(allDirectorys[0]);
YooAssetPath = AbsolutePathToAssetPath(targetDirectory);
return YooAssetPath; return YooAssetPath;
} }
@@ -504,9 +518,9 @@ namespace YooAsset.Editor
} }
return string.Empty; return string.Empty;
} }
#endregion #endregion
#region #region
/// <summary> /// <summary>
/// 是否含有中文 /// 是否含有中文
/// </summary> /// </summary>
@@ -567,9 +581,9 @@ namespace YooAsset.Editor
else else
return content.Substring(startIndex + key.Length); return content.Substring(startIndex + key.Length);
} }
#endregion #endregion
#region #region
// 枚举 // 枚举
public static void PlayerSetEnum<T>(string key, T value) public static void PlayerSetEnum<T>(string key, T value)
{ {
@@ -581,6 +595,6 @@ namespace YooAsset.Editor
string enumName = EditorPrefs.GetString(key, defaultValue.ToString()); string enumName = EditorPrefs.GetString(key, defaultValue.ToString());
return StringUtility.NameToEnum<T>(enumName); return StringUtility.NameToEnum<T>(enumName);
} }
#endregion #endregion
} }
} }

View File

@@ -1,6 +1,6 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 46c04934b6325ae4eaf66ae32034e329 guid: 3fec07d458534d34ea14d1b1a0a5100b
DefaultImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:

View File

@@ -1,9 +1,8 @@
{ {
"name": "com.tuyoogame.yooasset", "name": "com.tuyoogame.yooasset",
"displayName": "YooAsset", "displayName": "YooAsset",
"version": "0.0.1-preview", "version": "1.0.0",
"unity": "2019.4", "unity": "2019.4",
"keywords": [ "YooAsset", "Resources", "AssetBundle" ],
"description": "unity3d resources management system", "description": "unity3d resources management system",
"author": { "author": {
"name": "TuYoo Games", "name": "TuYoo Games",
@@ -11,7 +10,7 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/tuyoogame/YooAsset" "url": "https://github.com/tuyoogame/YooAsset.git"
}, },
"relatedPackages": {}, "relatedPackages": {},
"dependencies": {} "dependencies": {}

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -1,12 +1,51 @@
# 快速开始 # 快速开始
**下载安装** #### **下载安装**
1. 通过OpenUPM安装 1. **通过PackageManager安装**
2. 通过Packages安装
3. 通过GIT安装
**系统需求** 打开管理界面 **Edit/Project Settings/Package Manager**
````
// 输入以下内容
Name: package.openupm.cn
URL: https://package.openupm.cn
Scope(s): com.tuyoogame.yooasset
````
![image](https://github.com/tuyoogame/YooAsset/raw/main/Docs/Image/QuickStart-img1.jpg)
打开管理界面 **Edit/Windows/Package Manager**
![image](https://github.com/tuyoogame/YooAsset/raw/main/Docs/Image/QuickStart-img2.jpg)
2. **通过Packages清单安装**
直接修改Packages文件夹下的清单文件manifest.json
````json
{
"dependencies": {
"com.tuyoogame.yooasset": "0.0.1-preview",
......
},
"scopedRegistries": [
{
"name": "package.openupm.cn",
"url": "https://package.openupm.cn",
"scopes": [
"com.tuyoogame.yooasset"
]
}
]
}
````
3. **通过Github下载安装**
在发布的Release版本中选择最新版本下载Source Code压缩包。
#### **系统需求**
支持版本: Unity2019.4+ 支持版本: Unity2019.4+
@@ -14,7 +53,7 @@
开发环境: .NET4.x 开发环境: .NET4.x
**目录结构** #### **目录结构**
```` ````
Assets Assets

View File

@@ -1,7 +1,9 @@
[![License](https://img.shields.io/github/license/tuyoogame/YooAsset)](https://github.com/tuyoogame/YooAsset/blob/master/LICENSE)
![image](https://github.com/tuyoogame/YooAsset/raw/main/Docs/Image/LOGO.png) ![image](https://github.com/tuyoogame/YooAsset/raw/main/Docs/Image/LOGO.png)
# YooAsset
[![License](https://img.shields.io/github/license/tuyoogame/YooAsset)](https://github.com/tuyoogame/YooAsset/blob/master/LICENSE)[![openupm](https://img.shields.io/npm/v/com.tuyoogame.yooasset?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.cn/packages/com.tuyoogame.yooasset/)
**YooAsset**是一套用于Unity3D的资源管理系统用于帮助研发团队快速部署和交付游戏。 **YooAsset**是一套用于Unity3D的资源管理系统用于帮助研发团队快速部署和交付游戏。
它可以满足商业化游戏的各类需求并且经历多款百万DAU游戏产品的验证。 它可以满足商业化游戏的各类需求并且经历多款百万DAU游戏产品的验证。
@@ -57,7 +59,12 @@
Coming soon... Coming soon...
### 社区
**QQ群963240451**
### 友情链接 ### 友情链接
[huatuo](https://github.com/focus-creative-games/huatuo):华佗是一个**特性完整、零成本、高性能、低内存**的近乎完美的c#热更新方案 [huatuo](https://github.com/focus-creative-games/huatuo):华佗是一个**特性完整、零成本、高性能、低内存**的近乎完美的c#热更新方案