Skip to content

Unity Readme Example Fixes #22

@markgrossnickle

Description

@markgrossnickle

The readme examples for Unity has a couple issues as far as I can tell:
https://github.com/labstreaminglayer/liblsl-Csharp/blob/master/README-Unity.md

I am using Unity 2020.3.10f1

  1. LSLInput calls LSL.resolve_stream around line 19 but it can not find it. It should be LSL.LSL.resolve_stream as Unity seems to be getting confused with the namespace and class being the same (which probably should changed).

  2. LSLOutput references liblsl.channel_format_t.cf_float32 but it can not find it. If you remove liblsl from the start then it works.

  3. This is more of a best practices than an actual error but LSLOutput calls FixedUpdate and has a comment that says it is called once per frame. This is not true. FixedUpdate gets called at a fixed interval regardless of framerate. Typically 0.02ms. Perhaps that is ideal as framerate can fluctuate, but it is also dangerous as it could make the framerate behavior erratically if too much processing is put within FixedUpdate. Most likely this should be changed to Update or if it is intentional then the comment should be updated to reflect FixedUpdate's behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions