immersivecognition / unity-experiment-framework

UXF - Framework for creating human behaviour experiments in Unity
https://immersivecognition.github.io/unity-experiment-framework/
MIT License
214 stars 41 forks source link

Creating package #137

Closed ahmed-shariff closed 2 years ago

ahmed-shariff commented 2 years ago

This is an (ugly) solution to #84 The convention is to have Runtime, Editor, etc. folders and have the relevant assembly definitions there. But it's not necessary. This PR can act as a first step to converting UXF to a package. You can always restructure the project to follow the convention.

One thing that bugs me with this approach is the .meta files that get added. I can't directly add the meta files to the wiki pages. Hence, that creates a whole bunch of (harmless, but annoying) errors. An alternative approach is to use the path directive when adding the project through upm (https://forum.unity.com/threads/some-feedback-on-package-manager-git-support.743345/#post-5425311)

Note that this revision would work without the above if you add the package as a submodule (no recursive clone), which treats it as a local embedded package.

ahmed-shariff commented 2 years ago

Just for the heck of it, I tried it with the path directive (https://github.com/ahmed-shariff/unity-experiment-framework/tree/feat/subdir-package)

You can add the package by using the following as the directive when adding a git package in the package manager: https://github.com/ahmed-shariff/unity-experiment-framework.git?path=/Assets#feat/subdir-package (see https://docs.unity3d.com/Manual/upm-git.html#subfolder for info on how to add package in a subdir of a repo)

If you think this is a better alternative, I can switch the PR to that branch.

jackbrookes commented 2 years ago

Thanks for this! I will try to review and merge as soon as I can.

ahmed-shariff commented 2 years ago

I am closing this for now. I realize that there are some issues with the PR when I build it for oculus. I'll test it a bit more and see if I can submit a improved PR.