UnityProjectInstance fixed for older Unity versions#212
Merged
jwittner merged 4 commits intomicrosoft:developfrom Aug 3, 2020
Merged
UnityProjectInstance fixed for older Unity versions#212jwittner merged 4 commits intomicrosoft:developfrom
jwittner merged 4 commits intomicrosoft:developfrom
Conversation
…lder versions of Unity
timGerken
suggested changes
Aug 3, 2020
UnitySetup/UnitySetup.psm1
Outdated
| Write-Warning -Message "Exception Message: $($_.Exception.Message)" | ||
| } | ||
| finally{ | ||
| $prodName = "" |
There was a problem hiding this comment.
by doing this in finally, $prodName will always end up as the empty string. I'd move this line up into the end of the catch block and probably set it to $null instead of the empty string.
jwittner
requested changes
Aug 3, 2020
UnitySetup/UnitySetup.psm1
Outdated
| if (!$prodName) { throw "ProjectSettings is missing productName" } | ||
| } | ||
| catch { | ||
| Write-Warning -Message "An Exception was caught!" |
Member
There was a problem hiding this comment.
I think it's reasonable to print the exception, but since we know the issue you're seeing will be common, we should point that out with a message something akin to, "Could not read $projectSettingsFile, have you set your meta files to "Force Text"".
UnitySetup/UnitySetup.psm1
Outdated
| catch { | ||
| Write-Warning -Message "An Exception was caught!" | ||
| Write-Warning -Message "Exception Type: $($_.Exception.GetType().FullName)" | ||
| Write-Warning -Message "Exception Message: $($_.Exception.Message)" |
Member
There was a problem hiding this comment.
Can we use newlines to log these warnings? Otherwise they'll show up at three warnings when actually there's one.
jwittner
approved these changes
Aug 3, 2020
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.
Versions such as 5.6.0f3 do not have projectsettings.asset files that can be read in the same way as newer versions of Unity.