Universal Camera & Coordinate Management Solution
v2025.1 - Production ReadyOne method handles both 3D objects and UI elements seamlessly. No more separate Physics.Raycast and EventSystem.RaycastAll calls.
Automatic discovery, classification, and tracking of cameras. Intelligently handles main cameras, UI cameras, and overlays.
Easy conversion between screen, world, viewport, and UI coordinates. Works with both orthographic and perspective cameras.
Built-in Safe Area support for notches, Dynamic Island, and rounded corners. Automatically adapts to device orientation changes.
Real-time notifications for camera changes, resolution updates, and screen rotations. React to changes automatically.
Works out of the box with any game project. Automatic detection of render pipeline, input systems, and platform settings.
EG.Vision.System is a comprehensive development framework that unifies camera management, coordinate conversion, raycasting, and mobile features into a single powerful API. It eliminates the complexity of fragmented camera and input systems, providing a clean, production-ready solution for any game project.
One unified interface replaces multiple engine APIs
Dramatically reduce development time and complexity
Works out of the box with any game project
Full support for all mobile platforms and features
Production-tested clean architecture patterns
All render pipelines, input systems, and platforms
Real-time notifications for camera changes, resolution updates, and screen rotations
Full documentation and working examples for every feature
Get up and running with EG.Vision.System in just a few minutes.
VisionManager
component to any GameObject in the sceneEG.Vision.System follows SOLID principles and clean architecture patterns, ensuring maintainability, extensibility, and performance.
CameraDiscoveryService
CameraProvider
CameraDetector
CoordinateProvider
Screen ↔ World
UI ↔ Canvas
RaycastService
3D + UI Unified
Multi-touch
ScreenMonitor
Resolution Events
Safe Area
Component providing the framework bridge. Add it to any game object in the scene to activate the system. It handles initialization, updates, and serves as the main entry point.
Internal business logic coordinating all subsystems. Manages camera discovery lifecycle, coordinate conversions, and event distribution.
Continuously monitors the scene for camera changes. Automatically discovers new cameras, classifies them by type, and notifies the system of changes. Operates on configurable intervals (default: 2 seconds).
Handles all coordinate transformations between different spaces: screen coordinates, world positions, viewport coordinates, and local UI coordinates. Supports both orthographic and perspective cameras.
Provides unified raycasting that automatically determines whether to use Physics.Raycast for 3D objects or EventSystem.RaycastAll for UI elements. Returns comprehensive hit information.
Monitors screen resolution and orientation changes, generating events when changes are detected. Essential for adaptive mobile applications.
Main interface providing all Vision System functionality. Access via FindFirstObjectByType<VisionManager>()
.
screenPosition
- Screen coordinates in pixelscamera
- Optional camera (null = primary camera)
touchIndex
- Index of the touch (0 for first touch)
screenPos
- Screen coordinates in pixelsdepth
- World depth for perspective cameras, Z coordinate for orthographiccamera
- Optional camera (null = primary camera)
Property | Type | Description |
---|---|---|
hasHit | bool | Whether the raycast hit any object |
hitType | VisionRaycastHitType | Type of hit object (None, World3D, UI) |
hitObject | GameObject | GameObject that was hit by the raycast |
hitPoint | Vector3 | Exact hit point in world coordinates |
hitDistance | float | Distance from camera to hit point |
camera | Camera | Camera used for raycasting |
Property | Type | Description |
---|---|---|
cameraType | VisionCameraType | Camera classification (Main, UI, Overlay, Custom) |
isOrthographic | bool | Whether camera uses orthographic projection |
fieldOfView | float | Field of view for perspective cameras |
orthographicSize | float | Size for orthographic cameras |
Real-world implementation examples to get you started quickly.
Step-by-step guide to integrate EG.Vision.System into your existing project.
VisionManager
component to any GameObject in the sceneUnlock the full potential of EG.Vision.System with advanced features and customization options.
The system automatically discovers and classifies cameras, but you can override this behavior:
Common issues and their solutions to help you get the most out of EG.Vision.System.
Solutions:
Solutions:
A: No, use only one VisionManager per scene. The system automatically manages all cameras.
A: Yes, place VisionManager in the main scene and it will track cameras across all loaded scenes.
A: Yes, the system automatically detects cameras created by Cinemachine. Use events for synchronization.
A: Minimally. The system is optimized with caching and efficient algorithms. Camera discovery happens every 2 seconds by default.
Optimize your implementation for maximum performance and efficiency.