-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update the MRTK to support being placed in arbitrary folder names up to three directories deep. #5603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…to three directories deep. In looking into microsoft#5568, I found that the existing MRTK files code would look for specific folder names that MRTK gets put into (as in, containing folder names). It had very specific behaviors with respect to NuGetForUnity or consumption as .unitypackage - if you had consumed the code some other way (for example, used a manual nuget restore step separately from NuGetForUnity) this wouldn't work out, because the naming of the folders would be different (i.e. MRTK/*) instead of (Microsoft.MixedReality.Toolkit*/*). This change works around all that by introducing the concept of "sentinel" files, which are empty files that are named in a specific way and uniquely identify the root of an MRTK module/subfolder. Thus, when the MRTK files code finds a file called MRTK.SDK.sentinel, it knows that that folder is the root of the SDK MRTK subfolder, and it doesn't matter what name the root folder (or folders going up the root) are.
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
andreiborodin
suggested changes
Aug 12, 2019
andreiborodin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea, awesome change, requested some minor updates to the post process function.
Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityToolkitFiles.cs
Show resolved
Hide resolved
Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityToolkitFiles.cs
Show resolved
Hide resolved
Per PR comments, we should just run the regex directly on the asset filename, instead of truncating to folder, and then looking at all files within it.
andreiborodin
approved these changes
Aug 14, 2019
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Contributor
Author
|
/azp run mrtk_docs |
|
Azure Pipelines successfully started running 1 pipeline(s). |
wiwei
added a commit
to wiwei/MixedRealityToolkit-Unity
that referenced
this pull request
Aug 23, 2019
Update the MRTK to support being placed in arbitrary folder names up to three directories deep.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In looking into #5568, I found that the existing MRTK files code would look for specific folder names that MRTK gets put into (as in, containing folder names). It had very specific behaviors with respect to NuGetForUnity or consumption as .unitypackage - if you had consumed the code some other way (for example, used a manual nuget restore step separately from NuGetForUnity) this wouldn't work out, because the naming of the folders would be different (i.e. MRTK/) instead of (Microsoft.MixedReality.Toolkit/*).
This change works around all that by introducing the concept of "sentinel" files, which are empty files that are named in a specific way and uniquely identify the root of an MRTK module/subfolder. Thus, when the MRTK files code finds a file called MRTK.SDK.sentinel, it knows that that folder is the root of the SDK MRTK subfolder, and it doesn't matter what name the root folder (or folders going up the root) are.