Jump to content

Playnary

Verified Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Playnary

  1. Had the same freeze problem and followed imarin18' advice. Here's how they solve it exactly:
  2. Regarding the freeze - found the solution and described it in this thread, because someone else had the same problem there:
  3. Late to the party, but I've seen this issue come up in several threads here (and had it myself): The SaccadeVR project actually does a neat workaround that works for most use cases and a freeze because of the ongoing while/for loop in the eye tracking: You can hand over every end condition you might want to the loop in the separate callback thread through an intermediate function. In my case, it's a simple bool: static bool GetEndCondition() { return isQuitting; } that static bool is set OnApplicationQuit private void OnApplicationQuit() { isQuitting = true; } and the intermediate function called within the loop: while (FrameCount < MaxFrameCount) { CppFrameCount++; // Break loop when necessary so the Callback does not freeze Unity, e.g. when quitting the application bool endCondition; endCondition = GetEndCondition(); if (endCondition) // if needed compare the ending condition e.g. with the FrameCount or Unix time here break; // do stuff } Voilà. No more freeze on closing the Runtime & Stopping the Editor.
  4. Hi everyone - I get around 230hz or 4-5ms. That is without rendering from Unity though, I only use it to extract data. (Output is coming from a separate application) Specs: Win 11 / Unity 2020.2.4 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz 2.90 GHz 32,0 GB RTX 3070 Something peculiar though when I use the OP's code - editor and runtime crash on OnApplicationQuit / when I stop it. Full freeze. The only thing that is logged before is: Anyone having a similar issue?
×
×
  • Create New...