All Projects → DonnYep → CosmosFramework

DonnYep / CosmosFramework

Licence: MIT license
CosmosFramework is a lightweight plug-in Unity development framework . Has a rich Unity method extensions and toolchain. async/await syntax support, multi-network channel support.Long term support for this project

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to CosmosFramework

Baritone
google maps for block game
Stars: ✭ 3,868 (+2097.73%)
Mutual labels:  astar-algorithm, astar-pathfinding
Gsnova
Private proxy solution & network troubleshooting tool.
Stars: ✭ 509 (+189.2%)
Mutual labels:  tcp, kcp
jwEngine
A cross-platform C++<->lua server quick solution
Stars: ✭ 226 (+28.41%)
Mutual labels:  tcp, kcp
Qtnetworkng
QtNetwork Next Generation. A coroutine based network framework for Qt/C++, with more simpler API than boost::asio.
Stars: ✭ 125 (-28.98%)
Mutual labels:  tcp, kcp
Yasio
A multi-platform support c++11 library with focus on asio (asynchronous socket I/O) for any client application.
Stars: ✭ 483 (+174.43%)
Mutual labels:  tcp, kcp
Mirror
#1 Open Source Unity Networking Library
Stars: ✭ 2,905 (+1550.57%)
Mutual labels:  tcp, kcp
node-drivers
Industrial protocol drivers in node.js
Stars: ✭ 20 (-88.64%)
Mutual labels:  tcp
sonix
An Elixir client for Sonic Search
Stars: ✭ 56 (-68.18%)
Mutual labels:  tcp
node-dns
🌐 DNS Server and Client Implementation in Pure JavaScript with no dependencies.
Stars: ✭ 390 (+121.59%)
Mutual labels:  tcp
khttpd
An experimental HTTP server implemented as Linux kernel module
Stars: ✭ 41 (-76.7%)
Mutual labels:  tcp
AssetBundleManager
This script for easily use AssetBundle.
Stars: ✭ 79 (-55.11%)
Mutual labels:  assetbundle
fuso
一款体积小, 快速, 稳定, 高效, 轻量的内网穿透, 端口转发工具 支持多连接,级联代理,传输加密 (A small volume, fast, stable, efficient, and lightweight intranet penetration, port forwarding tool supports multiple connections, cascading proxy, and transmission encryption)
Stars: ✭ 1,132 (+543.18%)
Mutual labels:  kcp
tektosyne
The Tektosyne Library for Java provides algorithms for computational geometry and graph-based pathfinding, along with supporting mathematical utilities and specialized collections.
Stars: ✭ 52 (-70.45%)
Mutual labels:  astar-pathfinding
oyster-package-generator
Oyster is a package generator for Unity Package Manager (UPM). It generates a best standards Unity package with automated deployments via CLI. Focus on coding your package instead of deployments, changelogs, ect.
Stars: ✭ 18 (-89.77%)
Mutual labels:  unity-package-manager
boxtree
Quad/octree building for FMMs in Python and OpenCL
Stars: ✭ 52 (-70.45%)
Mutual labels:  quadtree
tcp-net
Build tcp applications in a stable and elegant way
Stars: ✭ 42 (-76.14%)
Mutual labels:  tcp
Socket
The Hoa\Socket library.
Stars: ✭ 61 (-65.34%)
Mutual labels:  tcp
SuperSimpleTcp
Simple wrapper for TCP client and server in C# with SSL support
Stars: ✭ 263 (+49.43%)
Mutual labels:  tcp
algoviz
Codebase for educational tool on algorithms
Stars: ✭ 21 (-88.07%)
Mutual labels:  astar-algorithm
Backdoor
A backdoor that runs on Linux and Windows
Stars: ✭ 36 (-79.55%)
Mutual labels:  tcp

CosmosGitLogo

License: MIT Issues:Welcome

English

CosmosFramework

CosmosFramework是一款轻量级的Unity开发框架。拥有丰富的Unity方法扩展以及工具链。async/await语法支持,多网络通道支持。框架遵循unityPackage规范,建议通过UPM导入使用。

导航

环境

  • Unity版本:2018及以上,DOTNET API版本:4.x。

模块简介

  • Audio: 游戏音效模块。通过注册音效信息,播放时传入音效名即可自动加载音效资源播放。音效支持分组,且可整组播放。

  • Config:游戏常用配置模块。用户可在游戏初始化时读取配置文件,并缓存于配置模块。运行时在其他所需位置读取对应配置的数据。

  • Event:事件中心模块。使用标准事件模型,提供了监听、移除、派发等常用事件功能。提供事件观测方法,可实时检测事件状态。

  • FSM:有限状态机模块。完全抽象的有限状态机,可针对不同类型的拥有者做状态机实现。

  • ObjectsPool:对象池模块。提供常用的实体对象生成回收等功能。底层使用数据结构Pool进行实现。

  • Resource:资源加载模块。内置提供AssetDatabase、AssetBundle以及Resource三种加载模式。AssetDatabase与AssetBundle模式支持引用计数,资源包会根据引用计数自动加载或卸载。此外此模块支持自定义加载方案。资源模块对应的编辑器位于Window>Cosmos>Module>Resource。

  • Scene:场景加载模块。提供常用的异步、同步加载嵌入的场景功能。支持自定义实现加载方式。

  • DataNode:数据缓存模块。数据以树形结构存储于此模块中,可通过web地址格式或者逗号分隔符获取对应数据的对象。

  • DataTable:数据表模块。在此模块中,数据行以对象形式存储于数据表中。数据表可实时增删改查,并通过自定义的反序列化方式生成所需要的数据对象。

  • Entity:游戏实体模块。管理游戏运行时的实体对象。实体支持组分类,通过传入资源地址可以直接管理资源实体对象的生成、回收等操作,内置对象池生成。

  • Input:输入适配模块。通过虚拟按键模拟各个平台的输入,传入不同的输入适配器可适配不同平台的输入方式。

  • Hotfix:热更新模块。此模块适用于基于C#的热更方案。(此方案未完善)

  • Network:网络模块。提供了多种高速可靠的UDP协议,如RUDP、SUDP、KCP、TCP等,默认使用KCP协议。网络以通道(Channel)形式区分各个连接,支持多种网络类型同时连接。可实现(Client-Server)模式。支持async/await语法。

  • UI:UI模块。抽象实现UI面板以及UI的加载方式。支持激活,失活,面板优先级,组别设置等功能,使用更轻便。框架提供了基于UGUI实现的面板类与资源加载帮助体。其他UI方案可自行扩展,目前稳定兼容FGUI。

  • Main:模块中心。自定义模块与扩展模块都存于此。自定义模块按照内置模块相同格式写入后,可享有完全同等与内置模块的生命周期与权限。几乎与内置模块无异。此主模块的内置轮询池:FixedRefreshHandler、LateRefreshHandler、RefreshHandler、ElapseRefreshHandler可对需要统一进行轮询管理的对象进行统一轮询,减少由于过多的Update等mono回调导致的性能损耗。

  • Controller:控制器模块。使用此模块进行注册后,无需生成实体对象(GameObject)也可进行轮询管理。此模块提供Update轮询。

  • WebRequest:UnityWebRequest模块,可用于加载持久化资源、网络资源下载等需求。支持获取AssetBundle、AudioClip、Texture2D、string。当资源获取到后,用户可通过WebRequestCallback对资源进行操作。

  • Download:下载模块。支持localhost本地文件下载与http文件下载。文件下载时以byte流异步增量写入本地。下载中支持动态添加、移除下载任务;

内置数据结构、工具

  • Utility:提供了反射、算法、断言、转换、Debug富文本、IO、加密、Json、MessagePack、Time、Text、Unity协程、Unity组件等常用工具函数。

  • Singleton:单例基类。提供了线程安全、非线程安全、MONO单例基类。

  • DataStructure:常用数据结构。链表、双向链表、双向字典、二叉树、四叉树、AStar、LRU、线程锁等数据结构。

  • Extensions:静态扩展工具。提供Unity的扩展以及C# Collections 常用数据结构的原生扩展。

  • Awaitable :此工具提供了async/await语法在unity环境中的支持。可以像写c#原生异步一样,在Unity中写异步。支持Task异步,Task执行完成后会回到主线程,使用时按照正常格式写即可。

  • EventCore 完全抽象的事件数据结构。内含普通、标准与线程安全类型。

    //声明一个类,使其派生自EventCore,并做类型约束。
    public class MyEventCore :EventCore<string,string, MyEventCore>{}
    //实现后即可使用自定义的事件监听。
  • ReferencePool :全局引用池模块。

  • Editor :Editor中提供了在Hierarchy常用检索对象、组件的方法,EditorConfig提供了代码生成是自动创建代码标头的功能;

  • FutureTask:异步任务检测,支持多线程与协程异步进度检测。检测函数需要传入Func格式的函数,当条件返回值为true时,异步检测结束。支持async/await语法,可使用await语句等待任务完成。

  • Pool:池数据结构。包含线程安全与非线程安全类型。框架中的对象池、引用池以及其他模块的缓存池都使用了“Pool”进行实现。

内置架构 PureMVC

  • 基于原始PureMVC改进的更适于理解的架构。 框架提供了基于特性更加简洁的注册方式:

    • 1.MVCCommandAttribute,对应Command,即C层;
    • 2.MVCMediatorAttribute,对应Mediator,即V层;
    • 3.MVCProxyAttribute,对应Proxy,即M层;
  • MVC自动注册只需在入口调用MVC.RegisterAttributedMVC()方法即可。

  • 派生的代理类需要覆写构造函数,并传入NAME参数。

  • 需要注意,MVC.RegisterAttributedMVC()方法需要传入对应的程序集。支持多程序集反射。

注意事项

  • 项目启动: 将CosmosConfig挂载于合适的GameObject上,运行Unity。若CosmosConfig上的PrintModulePreparatory处于true状态,则控制台会显示初始化信息。 自此,项目启动完成。

  • 部分带有Helper的模块可由使用者进行自定义实现,也可使用提供的Default对象;

  • 内置案例地址:Assets\Examples\ 。

UPM

  • CosmosFramework遵循unityPackage规范,可以完全将整个库放置于Packages目录下。

  • 从本地导入:选择Assets/CosmosFramework文件夹,拷贝到工程的Packages目录下。

  • 从git导入:填入url: https://github.com/DonnYep/CosmosFramework.git#v1.3_upm

其他

Library link

回到最上层

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].