artoolkitx / arunityx

artoolkitX for Unity, providing high-performance video acquisition, marker and texture tracking and full Unity Editor support
https://www.artoolkitx.org/
Other
41 stars 22 forks source link

Added default video pixel format for Windows #24

Closed OptrixAU closed 1 year ago

OptrixAU commented 4 years ago

Added a 'format' directive to the default Windows video config (otherwise a crash will occur). Added a couple of utility functions we routinely patch back into ARController - one to get the GameObject showing video, the other to grab a copy of the current video texture.

OptrixAU commented 4 years ago

Also included a few other tweaks, mostly targeted at runtime target creation.

Added a public static 'Instance' variable for ARController to allow any behaviour to get easy access to the core of the AR system.

Added a public getter for the pluginFunction member of the ARController, so it can be used in ARTrackable.

If the user has not specified a specific pluginFunction when creating an ARTrackable, it now defaults to using the common one on the ARController (can each ARTrackable have a distinct pluginFunction? Or is there really only ever one created by the ARController? It really looks like perhaps we should set up a public static for this so that we're not storing it on each of our markers.)

Added support for delayed-loading ARTrackables, in case script execution order isn't set right. In this case, ARController maintains a list of all ARTrackables that have not successfully loaded due to the plugin not being ready yet, and re-tries them on following frames until Load succeeds, or fails for a blocking reason. To facilitate this, I made Load return an integer status of -1 (failed), 0 (not ready) and 1 (success). It's not absolutely required, but it's convenient for newer users.

OptrixAU commented 4 years ago

Oh, also replaced two places in the Editor classes where Linq functions were used. While they DO work in Unity, theoretically Linq functions aren't .NET 2.0 compliant, and in my project I get conflicts caused by also using WebSockets4Net that prevent my application from compiling.

philip-lamb commented 1 year ago

I think most of this has been obsoleted by recent changes. The video object retrieval is not included elsewhere, but if needed could be added in a new PRq.