Git Product home page Git Product logo

catlib's Introduction

Codecov

Learn about CatLib/Core source code

About CatLib for Unity

CatLib for Unity is a service provider framework developed for Unity3D that is very helpful for the development of some functional businesses. We also reduce the unnecessary work of developers by integrating common development components.

Getting Started

Installed with Bucket

$ bucket require catlib/catlib

Learning CatLib

CatLib has full documentation support and you can learn from CatLib Documentation.

Or you can ask your question via issues and we will respond to you in a timely manner.

Contribution

CatLib is still a young framework, and her growth and your contribution are inseparable. If you want to contribute to the project, please refer to: CatLib Contribution Document Your contribution will be included in the contributor list, we welcome any form of Pull Request!

License

The open source license used by CatLib is: MIT license.

Support

catlib's People

Contributors

chinagzcp avatar ymh199478 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

catlib's Issues

v1.4.0 Change Log

Added

  • 增加对于Unity编辑器下的引导库支持(#14 )
  • 增加HelpURL链接的支持可以直接跳转到文档网页(#23 )
  • 编辑器增加服务提供者的可视化选择支持(#24 )
  • 增加了CHANGELOG.md(#29 )

Changed

  • 同步了CatLib.Core v1.4.0-beta版本(#22 )
  • 所有继承自Component的类型会被判定为不可以被构建的类型(#18 )
  • 引导程序结构优化(#19 )
  • BootstrapProviderRegister 会检查Component的挂载是否允许被获取,而不是引发一个异常(#20 )
  • 将继承自MonoBehaviour的服务提供者以代码的形式进行注册会引发一个异常(#25 )

Removed

  • Framework.cs 主引导类移除了默认不必要的事件注册。(#21 )

[Feature] Suggested distinguish between the configuration file name of the edit mode and the run mode.

The configuration file name of the editing environment is consistent with the runtime environmentconfiguration file name.

CatLib/
- Runtime/
- - Config/
- - - Assemblys.cs
- - - Bootstraps.cs
- - - Providers.cs
- Editor/
- - Config/
- - - Assemblys.cs
- - - Bootstraps.cs
- - - Providers.cs
Demo/
- Runtime/
- - Config/
- - - Assemblys.cs
- - - Bootstraps.cs
- - - Providers.cs
- Editor/
- - Config/
- - - Assemblys.cs
- - - Bootstraps.cs
- - - Providers.cs

The following is the structure of the proposed adjustment:

CatLib/
- Runtime/
- - Config/
- - - Assemblys.cs
- - - Bootstraps.cs
- - - Providers.cs
- Editor/
- - Config/
- - - EditorAssemblys.cs
- - - EditorBootstraps.cs
- - - EditorProviders.cs
Demo/
- Runtime/
- - Config/
- - - Assemblys.cs
- - - Bootstraps.cs
- - - Providers.cs
- Editor/
- - Config/
- - - EditorAssemblys.cs
- - - EditorBootstraps.cs
- - - EditorProviders.cs

The configuration file under the editor is recommended to add the Editor prefix.

English Translation

Hi, It would be good if you provide English translation for this repository.

Thanks.

编辑器增加服务提供者的可视化选择支持

继承自Component且实现了IServiceProvider的会被视为可视化服务提供者的。
开发者可以在编辑器中直接安装可视化的服务提供者。
安装完会以子对象的形式挂载在根节点上。

如果服务提供者实现了IServiceProviderType则显示以IServiceProviderType对应的类型为准。

[Question]关于OnStartCompleted的执行顺序

CatLib For Unity version 1.4
CatLib Core version 1.4
Unity 2018.3

直接运行Demo时,OnStartCompleted执行是在application.init之后就执行的。
把一个测试服务加入到Demo\Runtime\Config\Providers文件后,在application.init开始执行之后会跳过两帧才执行OnStartCompleted。
我的测试服务里无实际功能代码,也无协同。
这个OnStartCompleted执行顺序是否可控?

[BUG] Editing application cannot receive OnTerminate event.

CatLib For Unity version(s) affected: 1.4.0

Description

Editing application cannot receive OnTerminate event.

How to reproduce

  • Open the editor and switch to run mode
  • Observe the console without triggering the OnTerminate event

Possible Solution

Support for Terminate is not added under editor support.
Need to add corresponding support in the editor running support class

[BUG] The bootstrap always loads the runtime configuration in editor mode.

CatLib For Unity version(s) affected: 1.4.0

Description

The bootstrap always loads the runtime configuration in editor mode.
This will cause an exception in the editor environment in some services that are only allowed to be used at runtime.

How to reproduce

  • Create a service that only allows it to run at runtime,Similar to services that need to use unity Update()
  • Then add the service provider to the CatLib/Runtime/Config/Providers.cs file
  • Waiting for compilation to complete, an exception is thrown when the editor environment is triggered

Possible Solution

BootstrapProviderRegister and BootstrapTypeFinder classes are always load the runtime configuration. We need to remove this feature

public BootstrapProviderRegister(Component component, IServiceProvider[] serviceProviders = null)
{
    providers = Arr.Merge(Providers.ServiceProviders, serviceProviders);
    this.component = component;
}

Modifying the following method will fix this problem:

public BootstrapProviderRegister(Component component, IServiceProvider[] serviceProviders = null)
{
    providers = serviceProviders;
    this.component = component;
}

能否提供更明确的小游戏示例?

对于很多游戏客户端程序员来讲,所谓的依赖注入,路由这种东西,可以说完全没有接触过,
特别是有些C++转过来的程序员(比如我啦),
对于依赖注入这种东西,完全体会不到好处在哪里(没办法,C++很多东西都要自己手动轮一下)
所以对于各模块,不知作者是否有计划逐步添加示例?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.