[修改] 修改版本号为1.0.4
## HOMEPAGE
GameFrameX 的 Object Storage 组件
Object Storage 组件 (Object Storage Component) - 提供Object Storage组件相关的接口。
本文档涵盖了以下接口和类的功能说明:
IObjectStorageManager
IObjectStorageUploadManager
BaseObjectStorageUploadManager
ObjectStorageUploadFactory
IObjectStorageManager 接口定义了对象存储管理器的初始化方法,为后续的对象存储操作提供必要的环境配置。
Init(string accessKey, string secretKey, string bucketName)
IObjectStorageUploadManager 接口继承自 IObjectStorageManager,并在此基础上增加了上传文件和目录的功能。
SetSavePath(string savePath)
UploadDirectory(string localDirectory)
BaseObjectStorageUploadManager 是一个抽象类,它实现了 IObjectStorageUploadManager 接口的部分功能,并提供了一个抽象方法供子类实现具体的上传逻辑。
BucketSavePath
UploadRootPath
UploadDirectoryInternal(string localDirectory)
ObjectStorageUploadFactory 是一个静态工厂类,用于创建和初始化上传管理器实例。
Create<T>(string accessKey, string secretKey, string bucketName)
在使用上述接口和类之前,请确保已引入正确的命名空间:
using GameFrameX.ObjectStorage.Runtime;
IObjectStorageUploadManager uploadManager = ObjectStorageUploadFactory.Create<YourCustomUploadManager>("your_access_key", "your_secret_key", "your_bucket_name");
uploadManager.SetSavePath("desired/upload/path");
uploadManager.UploadDirectory("local/directory/to/upload");
请根据实际的业务需求和对象存储服务的特性,实现 BaseObjectStorageUploadManager 的抽象方法,以提供具体的上传逻辑。
直接在 manifest.json 的文件中的 dependencies 节点下添加以下内容
manifest.json
dependencies
{"com.gameframex.unity.objectstorage": "https://github.com/AlianBlank/com.gameframex.unity.objectstorage.git"}
在Unity 的Packages Manager 中使用Git URL 的方式添加库,地址为:https://github.com/AlianBlank/com.gameframex.unity.objectstorage.git
Packages Manager
Git URL
直接下载仓库放置到Unity 项目的Packages 目录下。会自动加载识别
Packages
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
## HOMEPAGE
GameFrameX 的 Object Storage 组件
Object Storage 组件 (Object Storage Component) - 提供Object Storage组件相关的接口。
使用文档(文档编写于GPT4)
功能说明文档
接口和类概览
本文档涵盖了以下接口和类的功能说明:
IObjectStorageManager
- 定义了对象存储管理器的初始化方法。IObjectStorageUploadManager
- 扩展了IObjectStorageManager
,添加了上传相关的功能。BaseObjectStorageUploadManager
- 抽象基类,提供了上传管理器的基本框架。ObjectStorageUploadFactory
- 静态工厂类,用于创建和初始化上传管理器实例。接口和类详细说明
IObjectStorageManager
功能描述
IObjectStorageManager
接口定义了对象存储管理器的初始化方法,为后续的对象存储操作提供必要的环境配置。方法说明
Init(string accessKey, string secretKey, string bucketName)
IObjectStorageUploadManager
功能描述
IObjectStorageUploadManager
接口继承自IObjectStorageManager
,并在此基础上增加了上传文件和目录的功能。方法说明
SetSavePath(string savePath)
UploadDirectory(string localDirectory)
BaseObjectStorageUploadManager
功能描述
BaseObjectStorageUploadManager
是一个抽象类,它实现了IObjectStorageUploadManager
接口的部分功能,并提供了一个抽象方法供子类实现具体的上传逻辑。属性说明
BucketSavePath
UploadRootPath
方法说明
Init(string accessKey, string secretKey, string bucketName)
SetSavePath(string savePath)
UploadDirectory(string localDirectory)
UploadDirectoryInternal(string localDirectory)
ObjectStorageUploadFactory
功能描述
ObjectStorageUploadFactory
是一个静态工厂类,用于创建和初始化上传管理器实例。方法说明
Create<T>(string accessKey, string secretKey, string bucketName)
使用指南
引入命名空间
在使用上述接口和类之前,请确保已引入正确的命名空间:
初始化和使用上传管理器
请根据实际的业务需求和对象存储服务的特性,实现
BaseObjectStorageUploadManager
的抽象方法,以提供具体的上传逻辑。注意事项
使用方式(任选其一)
直接在
manifest.json
的文件中的dependencies
节点下添加以下内容在Unity 的
Packages Manager
中使用Git URL
的方式添加库,地址为:https://github.com/AlianBlank/com.gameframex.unity.objectstorage.git直接下载仓库放置到Unity 项目的
Packages
目录下。会自动加载识别