hmd-eyes icon indicating copy to clipboard operation
hmd-eyes copied to clipboard

Would you consider refactoring as a custom package?

Open cboulay opened this issue 2 years ago • 2 comments

I find Unity custom packages much more maintainable and intuitive to integrate into Unity projects. The two most important benefits from a maintenance stand point are that (1) the package doesn't have to live in the project so multiple projects can share the same latest package and (2) packages can declare their dependencies on each other. Packages can be installed directly from github so there's no need to maintain an additional app repository.

The workflow would be to use the "package manager" window to add this package (via its git url). This makes all the scripts, assets, and plugins available to the developer.

The developer could also use that same menu to add Samples from the package. A given sample might include a scene with objects that make use of package assets, as well as assets that are unique to the scene.

I tried to drop the contents of the pupil package into my own custom package, but this failed to load because of NetMQ.dll. I have a couple native dlls in other folders that load fine, so I'm not sure what the problem is here. If I put the folder contents back into my project folder then it works.

I think I'll try to make a NetMQ custom package to isolate that problem. If I can get that to work then I will report back and maybe we can continue this conversation if you are interested.

cboulay avatar Mar 08 '22 15:03 cboulay

@cboulay sounds like an improvement over the current situation! Looking forward to your lessons learned from the custom netmq package. I guess we would need one for msgpack, too?

papr avatar Mar 08 '22 15:03 papr

Adding the precompiled assemblies turned out to be pretty straightforward. I can now import the package directly from GitHub, or with a little manipulate of <project_folder>/Packages/manifest.json it can be a dependency of another package.

See the text in the README: https://github.com/SachsLab/hmd-eyes#develop-integrate-and-extend

A few remaining issues:

  • [ ] Functionality untested! I don't have the hardware with me.
  • [ ] Importing Samples needs to be tested.
  • [ ] New workflow required to build and distribute precompiled test game.

cboulay avatar Mar 14 '22 20:03 cboulay