AI AR/VR AI Engineer
An AI AR/VR Engineer designs and deploys intelligent systems that power spatial computing experiences - from AI-driven scene under…
Skill Guide
The engineering practice of bridging Python-based machine learning frameworks (e.g., PyTorch, TensorFlow) with C#/C++ game engine runtimes (e.g., Unity, Unreal) to enable real-time inference of ML models within a game loop.
Scenario
Create a Unity project where a simple ONNX model (e.g., a classifier for game object states) is called from C# to influence a GameObject's color based on a predicted class.
Scenario
Implement a system in Unreal Engine where an NPC uses a vision model (e.g., simple object detection) to perceive the world, without blocking the main game thread.
Scenario
Design and implement a production-ready system for a live-service game that manages multiple ML models (e.g., dialogue, animation blending, player skill prediction) with dynamic loading, resource pooling, and telemetry.
Use PyTorch/TF for model training. Export to the ONNX format using built-in exporters or conversion tools. ONNX is the universal, engine-agnostic interchange format that is the cornerstone of this interop pattern.
ONNX Runtime is the primary C/C++ library for executing ONNX models. Use it to build the native bridge. Unity's ML-Agents (using Barracuda) and Sentis, and Unreal's NNE are higher-level, integrated alternatives for specific engines, abstracting away much of the manual interop.
For Unity, use C# with `[DllImport]` to call into your compiled C/C++ library. For Unreal, create a dedicated C++ module that links against ONNX Runtime and is accessible via UObject or Blueprint functions.
Use engine profilers to measure frame-time impact of inference calls. Use GPU profilers (RenderDoc/PIX) if using GPU inference. Use VS tools to debug memory leaks and crashes across the native-managed boundary.
Answer Strategy
The candidate must demonstrate knowledge of the full pipeline, not just one part. The strategy is to outline a sequential, technical workflow. Sample Answer: 'First, I'd export the PyTorch model to ONNX using torch.onnx.export, ensuring dynamic axes for batch size. Next, I'd build a C++ wrapper using ONNX Runtime to load the model and expose a C-compatible function for detection. I'd compile this into a platform-specific plugin. In Unity, I'd create a C# script using DllImport to call the native function, marshaling the camera texture as a byte array input and receiving bounding box coordinates as a struct array output. Finally, I'd run inference in a coroutine or dedicated thread to avoid frame hitches.'
Answer Strategy
Tests problem-solving and optimization skills. The answer should follow a systematic debugging and optimization framework. Sample Answer: 'I'd start by profiling with Unreal Insights to isolate the inference call's cost. If it's CPU-bound, I'd move the inference to an async task using the TaskGraph, ensuring the animation update doesn't block the game thread. If it's GPU-bound, I'd consider model quantization (e.g., from FP32 to FP16) or switching to a more optimized runtime like TensorRT if on NVIDIA hardware. I'd also investigate batching-grouping multiple character updates into a single inference call if the model architecture supports it. As a last resort, I'd implement a fallback system to use the traditional animation blend when frame budget is exceeded.'
1 career found
Try a different search term.