# zframework **Repository Path**: Wnity/zframework ## Basic Information - **Project Name**: zframework - **Description**: framework framework framework - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: unitask - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2022-01-10 - **Last Updated**: 2026-01-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: zframework ## README # zframework zframework is a lightweight framework designed for Unity developers, aiming to simplify resource management, object pooling, sprite atlas generation, and other functionalities. It provides a series of utility classes and managers to help developers quickly implement common game development requirements. ## Features - **Object Pool Management**: Efficient object creation and recycling via the `ObjectPool` class, reducing frequent garbage collection pressure. - **Resource Loading Management**: Supports synchronous and asynchronous resource loading via the `ResMgr` class, with multiple loading methods available. - **Download Management**: Implements file downloading functionality via the `DownloadFileMgr` class. - **Network Request Management**: Implements simple HTTP requests via the `WebRequestMgr` class. - **Sprite Atlas Generation**: Generates sprite atlases in the editor via the `SpriteAtlasGenerator` class. - **Sprite Management**: Manages loading and usage of sprite atlases via the `SpriteMgr` class. - **UI Extensions**: Enables asynchronous loading of UI assets via the `UGUI_LoadAssetHelper` class. ## Installation 1. Clone the repository locally: ```bash git clone https://gitee.com/Wnity/zframework.git ``` 2. Import the `zframework` folder into your Unity project. ## Usage Examples ### Object Pool Usage ```csharp // Retrieve an object from the object pool GameObject obj = ObjectPool.PopFromPool("MyPrefab"); // Return the object to the object pool obj.RecycleToPool(); ``` ### Resource Loading ```csharp // Asynchronously load a resource ResMgr.Instance.LoadAssetAsync("MyPrefab", (obj) => { // Use the loaded resource }); // Synchronously load a resource GameObject obj = ResMgr.Instance.LoadAsset("MyPrefab"); ``` ### Downloading Files ```csharp // Asynchronously download a file DownloadFileMgr.Instance.DownloadAsync("http://example.com/file.txt", (path) => { // Use the downloaded file }); ``` ### Sprite Atlas Generation 1. Create a `SpriteAtlasGenerator` asset in the Unity Editor. 2. Configure the sprite atlas generation parameters. 3. Click the "GenerateAtlases" button to generate the sprite atlas. ## Contribution Contributions and suggestions are welcome! Please submit issues or proposals via [GitHub Issues](https://gitee.com/Wnity/zframework/issues). ## License This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.