How ahmedawwan/unity-human-anatomy-ar works
Main Components
• AR Module: This includes the camera feed, surface detection algorithms, and placement logic. Capture the process where after authentication, the camera activates and the system uses ARCore (and possibly Unity’s AR subsystems) to detect surfaces and show a crosshair/indicator.
• Object Augmentation Module: Responsible for handling the selection of 3D human anatomy models (located in the Models folder) and their instantiation in the AR scene. It covers the logic that takes user input (via custom scroll views, prefabs, and related UI scripts) to place and render selected objects at the crosshair’s location.
• Interaction/Transformation Module: Manages touch gestures for scaling, rotating, and moving the augmented object. This can involve inputManager.cs, zoomManager.cs, and other transformation-related scripts.
• UI and Experience Module: Contains components such as custom scroll views, label displays, and information panels. Look into folders like “Clean Settings UI”, “MarkLight”, and “TextMesh Pro” which are used for building and styling the UI.
• Authentication Module: Integrates Firebase for user authentication. The presence of Scripts like authenticationManager.cs and Firebase-related assets in the Plugins and Data directories show that login and user management are handled via Firebase.
• Asset Management and Resources: This component covers the handling of 3D models, textures, materials, animation controllers, and any external plugins (such as DOTween) used to enhance dynamic behavior and transitions.
Out the Relationships and Interactions
• The user (mobile device) initiates the application and is first routed to an authentication screen which uses Firebase.
• Once authenticated, the AR Module activates the camera and runs surface detection, with the system placing a crosshair indicating valid surfaces.
• The UI Module then allows the user to scroll through and select an anatomy model. When a selection is made, the Object Augmentation Module instantiates the model at the crosshair’s position.
• The Interaction Module manages touch gestures. Data flows from input managers to adjust the object’s position, scale, and rotation.
• If the viewer centers their view on an object, the UI Module (along with label/viewer scripts) displays extra information about anatomical parts.
Architectural Patterns and Principles
• Component-Based Architecture: Being a Unity project, each functionality is likely encapsulated in separate components and prefabs (e.g., separate scripts for handling UI, animations, interactions, etc.).
• Separation of Concerns: Notice the clear division between AR functionality, UI handling, authentication, and asset management.
• Modularity and Extensibility: The rich directory structure (e.g., MarkLight for UI, DOTween for animations, Firebase integration) suggests a design where modules can be maintained and extended independently.
Relevant Technologies and Frameworks
• Unity Game Engine as the core platform.
• ARCore and XR Interaction Toolkit for AR and XR services.
• Firebase for authentication.
• DOTween for animations.
• MarkLight and TextMesh Pro for UI layout and text rendering.