Update the extension service creator to work when the extension package isn't installed#7087
Merged
wiwei merged 2 commits intomicrosoft:mrtk_developmentfrom Jan 17, 2020
Merged
Conversation
…nd instead of throwing an exception and ensure that the extension service creator is resilient to a missing Extensions folder
Contributor
Author
|
Note that MixedRealityToolkitFiles.cs wasn't technically necessary, but it currently throws an exception if the folder doesn't exist and I think it makes more sense to just return null instead of some archaic error. |
keveleigh
reviewed
Jan 17, 2020
Assets/MixedRealityToolkit.Tools/ExtensionServiceCreator/ExtensionServiceCreator.cs
Show resolved
Hide resolved
Assets/MixedRealityToolkit.Tools/ExtensionServiceCreator/ExtensionServiceCreator.cs
Outdated
Show resolved
Hide resolved
…sionServiceCreator.cs Co-Authored-By: Kurtis <kurtie@microsoft.com>
keveleigh
approved these changes
Jan 17, 2020
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
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
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.
Overview
The extension service creator wizard today looks for the MixedRealityToolkit.Extensions folder in order to place its newly generated content. This fails when the default extensions package isn't installed, because the folder doesn't exist. Note that it's more than just the folder that needs to exist - each of the MRTK folders also require a 'sentinel' file to be placed in them, so that the MixedRealityToolkitFiles.cs code can find them even when they are placed in arbitrary folders/locations within the project (to support placing the MRTK at arbitrary locations). As a result, the code that tries to re-create the extensions folder doesn't work (i.e. it doesn't do the sentinel file creation).
In reality, because these are generated files, they should really go into the MixedRealityToolkit.Generated folder, so I've changed it to avoid the default/inbox Extensions folder. Now it shares the same general destination as other wizard generated assets.
Changes