# leloctai/pissstreamunity architecture

> Architecture diagram of the GitHub repository leloctai/pissstreamunity, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/leloctai/pissstreamunity
- Repository: https://github.com/leloctai/pissstreamunity

## Overview

##### Project Type Analysis
This is a Unity Editor extension that integrates with external real-time data services. The project combines toolbar customization with real-time data streaming functionality.

##### Main Components

A. External Services Layer:
- LightStreamer Service (ISS Live Data Provider)

B. Core Components:
- Data Streaming Module (pISSStream.cs)
- UI Indicator Module (pISSIndicator.cs)
- Custom Toolbar Integration Layer

C. Third-party Dependencies:
- LightStreamer Client
- Microsoft.AspNetCore.JsonPatch
- CustomToolbar Framework

**[Component Layout]**

- LightStreamer API    |

- ↓

- pISSStream.cs       |
- (Data Streaming Layer) |

- ↓

- pISSIndicator.cs     |
- (UI Controller)     |

- ↓

- Custom Toolbar      |
- Integration        |

- ↓

- Unity Editor UI     |

##### Important Elements to Highlight

A. Data Flow:
- Real-time data flow from LightStreamer to the Unity Editor
- Update frequency if known
- Async operations distinctly

B. Integration Points:
- LightStreamer client connection
- Unity Editor Toolbar hooks
- UI update mechanisms

##### Technical Details

- Assembly definitions (asmdef files) boundaries
- Separation between editor-time and runtime components
- Where the toolbar customization hooks into Unity's existing systems

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph External
        LS[LightStreamer Service]
    end

    subgraph Core["Core Components"]
        DS["Data Streaming Module"]:::core
        UI["UI Indicator Module"]:::core
        LSI["LightStreamer Integration"]:::core
    end

    subgraph Toolbar["Custom Toolbar Framework"]
        TE["Toolbar Extender"]:::toolbar
        TC["Toolbar Callback"]:::toolbar
        TS["Toolbar Styles"]:::toolbar
        TU["Toolbar Utils"]:::toolbar
    end

    subgraph Dependencies["Third-party Dependencies"]
        JP["JSON Patch Library"]:::dep
    end

    subgraph Assemblies["Assembly Definitions"]
        CA["Core Assembly"]:::assembly
        TA["Toolbar Assembly"]:::assembly
    end

    subgraph Editor["Unity Editor Integration"]
        UEI["Editor UI Layer"]:::editor
    end

    %% Connections
    LS --> LSI
    LSI --> DS
    DS --> UI
    UI --> TE
    TE --> TC
    TC --> TS
    TE --> UEI
    JP --> DS

    %% Assembly Relationships
    CA --> DS
    CA --> UI
    TA --> TE
    TA --> TC
    TA --> TS
    TA --> TU

    %% Click Events
    click DS "https://github.com/LeLocTai/pISSStreamUnity/blob/master/Editor/pISSStream.cs"
    click UI "https://github.com/LeLocTai/pISSStreamUnity/blob/master/Editor/pISSIndicator.cs"
    click LSI "https://github.com/LeLocTai/pISSStreamUnity/blob/master/Editor/Lightstreamer/Lightstreamer.DotNetStandard.Client.xml"
    click TE "https://github.com/LeLocTai/pISSStreamUnity/blob/master/Editor/CustomToolbar/Scripts/ToolbarExtender.cs"
    click TC "https://github.com/LeLocTai/pISSStreamUnity/blob/master/Editor/CustomToolbar/Scripts/ToolbarCallback.cs"
    click TS "https://github.com/LeLocTai/pISSStreamUnity/blob/master/Editor/CustomToolbar/Scripts/ToolbarStyles.cs"
    click JP "https://github.com/LeLocTai/pISSStreamUnity/blob/master/Editor/Microsoft.AspNetCore.JsonPatch/Microsoft.AspNetCore.JsonPatch.xml"
    click CA "https://github.com/LeLocTai/pISSStreamUnity/blob/master/Editor/LeTai.pISSStream.asmdef"
    click TA "https://github.com/LeLocTai/pISSStreamUnity/blob/master/Editor/CustomToolbar/com.smkplus.custom-toolbar.asmdef"
    click TU "https://github.com/LeLocTai/pISSStreamUnity/blob/master/Editor/CustomToolbar/Scripts/Utils/ForceReserializeAssetsUtils.cs"

    %% Styling
    classDef external fill:#2374ab
    classDef core fill:#57a773
    classDef toolbar fill:#ff8c42
    classDef dep fill:#845ec2
    classDef assembly fill:#4e4e4e,color:#ffffff
    classDef editor fill:#ff6b6b

    class LS external
    class DS,UI,LSI core
    class TE,TC,TS,TU toolbar
    class JP dep
    class CA,TA assembly
    class UEI editor
```
