How rutherfordum/test_task_atlantis works
This project is a Unity-based AR application with a modular service architecture. Its main purpose is to load and display content – including 3D models (GLB/glTF), images for AR tracking, and more – and to manage internet connectivity, content download, and augmented reality support. In addition, it leverages several external libraries such as Extenject (for dependency injection), UniTask/UniRx (for asynchronous tasks and reactive programming), glTFast (for fast GLTF loading), and ARFoundation (for AR functionality).
Main Components
• Services Layer:
• WebRequestService: Handles downloading byte arrays and textures from the internet.
• InternetAccessService: Monitors and checks for internet connectivity based on a configurable interval and URL.
• ContentDownloadService: Combines the functionality of WebRequestService and InternetAccessService to manage content downloads.
• GltfImportService: Loads GLB/GLTF models and brings them onto the scene.
• ARTrackedImageService: Responsible for detecting images and overlaying data within AR mode.
• ARSupportService: Checks device AR support to conditionally enable AR features.
• Additional UI/Interaction Services: For example, MainCanvasViewService that ties UI elements into the experience.
• Configuration and Resources:
• Configuration files located in Assets/_Project/Resources/Configurations.
• Prefabs and Scene Assets in Assets/_Project/Resources and Assets/_Project/Scenes.
• Dependency Injection and Utilities:
• Extenject is used to wire all components together.
• UniTask and UniRx are employed for handling asynchronous operations and reactive event streams.
• External Libraries:
• glTFast (GLTF loading), ARFoundation (for managing AR interactions), and others for text rendering (TextMesh Pro) and XR support.
Defining Relationships and Interactions
• Data Flow:
• The ContentDownloadService sits as an orchestrator: it calls into WebRequestService for downloading files and uses InternetAccessService to validate connectivity.
• Once download tasks complete (potentially via asynchronous UniTask calls), GltfImportService takes over to load models into the scene.
• In parallel or subsequent operations, ARTrackedImageService continuously monitors for images, and ARSupportService governs whether AR mode is enabled based on device capabilities.
• Integration Points:
• Each service reads from its respective configuration (from the Assets/_Project/Resources/Configurations).
• Event and Observer Patterns:
Architectural Patterns & Design Principles
• Modular Service Design:
Each service is decoupled and likely encapsulated into separate assemblies (visible by the *.asmdef files) for testability and maintenance.
• Dependency Injection:
The use of Extenject enables object creation and wiring to be managed externally, so denote a central DI container node that connects to most services.
• Asynchronous / Reactive Programming:
Services interact asynchronously (UniTask) and use reactive streams (UniRx) to propagate events (e.g., download progress or AR tracking updates).
• Clear labels for every component.