BDFramework Documentation

repository·master·Indexed 25 days ago

https://github.com/yimengfan/bdframework.core

A Unity3D game development workflow designed to streamline the pipeline from development to deployment through automation and editor enhancements. The framework includes components such as il2cpp_plus, a modification of the IL2CPP runtime that enables dynamic DLL metadata registration (requiring HybridCLR), the Boehm-Demers-Weiser Garbage Collector (BDWGC) for C/C++ memory management, the libatomic_ops library for hardware-provided atomic memory updates, and xxHash for high-performance hashing.

Tokens
15.8K
Snippets
12
Records
112
Agent score
83%

What's inside BDFramework

  1. Overview of xxHash digest algorithm

    master

    xxHash is a high-speed, non-cryptographic digest algorithm that produces a 32-bit (XXH32) or 64-bit (XXH64) fingerprint from an arbitrary length message. It is designed for speed and provides a system-independent output regardless of CPU endianness or width.

    Key Characteristics:

    • Non-cryptographic: Not intended to prevent intentional collisions or preimage attacks.
    • Platform Optimized: XXH32 is optimized for 32-bit machines, while XXH64 is optimized for 64-bit machines.
    • Deterministic: The same input and seed will produce the same output on any CPU/OS.
    • Endianness: Input lanes are read using little-endian convention, but the canonical binary/hexadecimal output follows big-endian convention.
  2. Overview of HybridCLR

    master

    HybridCLR is a high-performance, low-memory, and feature-complete C# hot-update solution for Unity across all platforms. It transforms the standard IL2CPP AOT (Ahead-of-Time) runtime into a hybrid 'AOT + Interpreter' runtime. This allows for native support of dynamic assembly loading (via System.Reflection.Assembly.Load), enabling hot-updates on platforms with JIT restrictions like iOS and various consoles.

    Key advantages include:

    • Seamless Integration: Hot-update code and AOT code exist in the same runtime. You can use inheritance, reflection, and multi-threading (volatile, ThreadStatic, Task, async) between them without code generation or adapters.
    • Differential Hybrid Execution: A technique where modified or new classes/functions run in interpreter mode, while unchanged code runs at native AOT speeds.
    • High Performance & Low Memory: Uses an efficient register interpreter and ensures hot-update classes occupy the same memory footprint as standard C# classes.
  3. Overview of BDFramework Core Features

    master

    BDFramework is a Unity3D game development workflow framework designed to automate industrial pipelines. Key functional areas include:

    • Pipelines: BuildPipeline, PublishPipeline, and HotfixPipeline for automated workflows.
    • C# Hotfix: Custom compilation services, optional project decoupling, and one-click DLL packaging compatible with DevOps/CI/CD.
    • Table Management: Excel to Class/Sqlite/Json/Xml generation, SQLite ORM (hotfix compatible), and custom logic detection.
    • Asset Management: Automated switching between AssetBundle and Editor modes, visual packaging configuration, incremental bundling, and AssetBundle obfuscation.
    • UFlux UI Workflow: A Flux-based UI management mechanism (similar to MVI) supporting Windows, Components, States, and Props, with data binding and Dependency Injection (DI).
    • Logic Management: Automatic registration of managers and managed classes, including built-in ScreenviewManager, UIManager, and EventManager.
  4. Overview of BDFramework features

    master

    BDFramework is a Unity3D game workflow designed for efficiency and automation. Key features include:

    • One-key C# Hotfix: Uses a modified ILRuntime implementation that eliminates the need for separate projects and includes an automatic script compilation and collection mechanism.
    • One-key Publishing: Automates the packaging of code, resources, and data tables, including automatic version management downloads.
    • Resource Management: Provides a unified API that automatically switches between AssetBundle (AB) and Editor modes. It includes atlas management, automatic shader collection, and a streamlined addressable system that works regardless of whether assets are in StreamingAssets or persistent directories.
    • UI Workflow: A logic-focused UI management system (compatible with UGUI, NGUI, etc.) featuring value binding, data monitoring, data flow, and state management.
    • SQL Table Management: Uses SQLite for data management and provides conversion tools: excel2code, excel2json, and excel2sqlite.
    • Discovery-based Business Registration: A highly extensible mechanism where managers (like UIManager, EventManager, and ScreenviewManager) are automatically registered via custom labels, removing the need for manual registration code.
  5. Overview of libatomic_ops functionality

    master

    The libatomic_ops package provides semi-portable access to hardware-provided atomic memory update operations across multiple architectures. It is designed to enable:

    • Advanced operations within signal handlers.
    • Effective use of multiprocessors through lock-free code.
    • Experimentation with new thread programming paradigms.

    Note that lock-free code is difficult to implement correctly and may be less portable or not always faster than traditional lock-based code.

  6. Overview of BDFramework

    master

    BDFramework is a comprehensive and efficient pipeline for Unity3D game development. It provides a complete workflow from development to deployment, focusing on automation and editor enhancements. Key features include:

    • Hot-fixing: Support for updating code without full redeployment.
    • Asset Management: Tools for managing game assets efficiently.
    • Automated Building: Streamlined processes for generating game builds.

    The framework aims to provide a 'Simple! Easy! Professional!' workflow for Unity developers.

  7. Overview of Boehm-Demers-Weiser Garbage Collector (BDWGC)

    master

    BDWGC is a conservative garbage-collecting storage allocator designed as a plug-in replacement for C's malloc. It is intended for use in C and C++ environments where explicit deallocation is difficult or error-prone.

    Key characteristics:

    • Conservative Scanning: It does not require pointers to be tagged, meaning it scans memory to identify potential pointers.
    • Collection Modes: Operates either with the mutator stopped during the entire collection (default) or incrementally during allocations.
    • Thread Support: Can be built with or without thread support and can leverage multiprocessors on supported platforms.
    • Interior Pointers: By default, it supports ALL_INTERIOR_POINTERS, allowing heap pointers to point anywhere inside an object. This can be disabled to reduce accidental retention of garbage objects.
  8. HybridCLR Platform Support and Compatibility

    master

    HybridCLR provides extensive platform support and version compatibility:

    • Platforms: Fully supports all platforms including UWP, PS5, iOS (with source code build support in 5.0.0), and Android.
    • Unity Versions:
      • 5.0.0: Restores support for Unity 2019.
      • 4.0.4: Provides full platform support.
      • 3.4.2: Supports Unity 2022.3.7 and 2021.3.29.
    • Note: For Unity 2021 and newer, AOT DLL stripping is handled via MonoHook (since 4.0.4).