Skip to content

add a data converter using hmd orientation as et proxy#30

Merged
eioe merged 4 commits into
devfrom
feat/head-et-proxy
May 27, 2026
Merged

add a data converter using hmd orientation as et proxy#30
eioe merged 4 commits into
devfrom
feat/head-et-proxy

Conversation

@eioe

@eioe eioe commented May 15, 2026

Copy link
Copy Markdown
Member

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.

@eioe eioe requested a review from thefirstfloor May 15, 2026 15:54
@eioe eioe self-assigned this May 15, 2026

@thefirstfloor thefirstfloor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 EyeDataConverterHead and a Eye-Head-EyeDataConverter helper prefab, plus a Unity Editor menu item to instantiate it.
  • Update EyeDataGeneratorCenterEye / EyeDataGeneratorAllEyes to allocate a new EyeDataPackage in Update() (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)]
@eioe eioe merged commit ccb7855 into dev May 27, 2026
1 check passed
@eioe eioe deleted the feat/head-et-proxy branch May 27, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants