add a data converter using hmd orientation as et proxy#30
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a “head-orientation proxy” EyeData converter (script + helper prefab) to demonstrate EDIA Eye setup without a vendor-specific eye-tracking submodule, and updates dummy generators to emit a fresh EyeDataPackage per pushed sample (avoiding shared-instance mutation).
Changes:
- Add
EyeDataConverterHeadand aEye-Head-EyeDataConverterhelper prefab, plus a Unity Editor menu item to instantiate it. - Update
EyeDataGeneratorCenterEye/EyeDataGeneratorAllEyesto allocate a newEyeDataPackageinUpdate()(per sample).
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Assets/com.edia.eye/Runtime/Scripts/EyeDataGeneratorCenterEye.cs | Allocate a new EyeDataPackage per frame before populating/pushing. |
| Assets/com.edia.eye/Runtime/Scripts/EyeDataGeneratorAllEyes.cs | Allocate a new EyeDataPackage each frame before conditional population/push (currently introduces blank samples). |
| Assets/com.edia.eye/Runtime/Scripts/EyeDataConverterHead.cs | New head-proxy converter that pushes a center-eye “straight ahead” sample each frame. |
| Assets/com.edia.eye/Runtime/Scripts/EyeDataConverterHead.cs.meta | Unity meta for the new script. |
| Assets/com.edia.eye/Runtime/Resources/Prefabs/Helpers/Eye-Head-EyeDataConverter.prefab | New helper prefab wiring the new converter component. |
| Assets/com.edia.eye/Runtime/Resources/Prefabs/Helpers/Eye-Head-EyeDataConverter.prefab.meta | Unity meta for the new prefab. |
| Assets/com.edia.eye/Editor/EdiaPrefabsMenu.cs | Adds a GameObject menu item to create the new head-proxy prefab. |
Files not reviewed (2)
- Assets/com.edia.eye/Runtime/Resources/Prefabs/Helpers/Eye-Head-EyeDataConverter.prefab.meta: Language not supported
- Assets/com.edia.eye/Runtime/Scripts/EyeDataConverterHead.cs.meta: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+47
to
51
| _ed = new(); | ||
|
|
||
| if (Time.time > (_lastTime + _randomWaitValue)) { | ||
| // Update fake eye data only after random interval | ||
| _randomWaitValue = UnityEngine.Random.Range(0.01f, 0.5f); |
|
|
||
| _ed.timestamp_et = Time.realtimeSinceStartup; | ||
|
|
||
| _timestampLsl = LslTimer != null ? LslTimer.GetLslTime() : 0; |
Comment on lines
+28
to
+30
| Debug.LogError("To use LSL timing, the DebugDataSender requires a component on the same GameObject " + | ||
| "which implements the ILslTimeAccessible interface (e.g., Edia.Lsl.LslTiming or " + | ||
| "Edia.Lsl.EyeOutlet)."); |
Comment on lines
+14
to
+17
| // Locals | ||
| private double _timestampLsl; | ||
| private EyeDataPackage _ed; | ||
| private double _lastTime; |
| InstantiatePrefab("Helpers", "Eye-GazeVisualizer", menuCommand); | ||
| } | ||
|
|
||
| [MenuItem("GameObject/EDIA/Eye/Helpers/Eye-HeadDataConverter", false, 1)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
simple script and prefab which mimics a EyeData converter but just gives the "unicorn" ray / eye data.
Main use case is for demonstrating the setup without needing a specific HMD eye submodule. Prefab and script naming are coherent with how the stuff is named in the submodules to make it clear where the actual stuff should go, etc.