Skip to content
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

Mrtk forward compatibility #1059

Merged
merged 30 commits into from
Oct 3, 2017
Merged

Mrtk forward compatibility #1059

merged 30 commits into from
Oct 3, 2017

Conversation

StephenHodgson
Copy link
Contributor

@StephenHodgson StephenHodgson commented Oct 3, 2017

Redone PR of #1048 (Messed up my rebase)

Gets some of the forwards compatibility issues out of the way.

Most changes are to the Build and Deploy windows and Mixed Reality Toolkit Menus

Fixes #851
Fixes #895
Fixes #1018
Fixes #1019

StephenHodgson and others added 29 commits September 28, 2017 01:52
Copy link

@thebanjomatic thebanjomatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small changes, otherwise it looks good

return PlayerSettings.GetScriptingBackend(BuildTargetGroup.WSA) == ScriptingImplementation.WinRTDotNET && DotNetAvailable();
}

public static bool DotNetAvailable()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I have a preference for naming these function IsDotNetAvailable and IsIl2CppAvailable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Sorry I usually do the same.


if (GUILayout.Button("Open Build Directory"))
{
Process.Start("explorer.exe", "/f /open," + BuildDeployPrefs.AbsoluteBuildDirectory);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will open a new explorer window every time. If we used Process.Start(BuildDeployPrefs.AbsoluteBuildDirectory) instead, I think it would re-use the same explorer window and just bring it to the front.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was the intention to open a new window each time.

I usually have specific explorer windows open, and would be frustrated if one of them were to change on me unexpectedly.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, to clarify the behavior is that it will only reuse the window if one is already open to that exact directory. It won't reuse any windows that are opened to different directories. You can test out the behavior by typing directory names in the Win+R run dialog.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also wanted to use /f to give the window focus because without it the editor stays on top.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm, seems to work fine.

// Build Platform (and save setting, if it's changed)
string curBuildPlatformString = BuildDeployPrefs.BuildPlatform;

BuildPlatformEnum buildPlatformOption;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about something like this instead here:

BuildPlatformEnum buildPlatformOption;
if (!Enum.TryParse(curBuildPlatformString, true /*ignoreCase*/, out buildPlatformOption))
{
    buildPlatformOption = BuildPlatformEnum.AnyCPU;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that the AnyCPU enum string doesn't match the string we need to match with (Any CPU) which gets passed to the msbuild process later.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But in that case, it will fail the TryParse and then be set inside the if branch. Granted, that behavior isn't spelled out directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see System.Enum.TryParse. Is this feature .NET > 3.5?

Only System.Enum.Parse.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, looks like it was added in 4.0... bummer.

@StephenHodgson
Copy link
Contributor Author

Anything else Adam?

Copy link
Contributor

@SimonDarksideJ SimonDarksideJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build settings themselves are fine.
However the build system will need some fixes later, as some of the commands (Scene settings fails with a dictionary fail).
But the PR itself is good.

@StephenHodgson
Copy link
Contributor Author

StephenHodgson commented Oct 3, 2017

@DDReaper which scene setting issues? please make an issue detailing the bugs.

@StephenHodgson StephenHodgson merged commit 4ff9658 into microsoft:master Oct 3, 2017
@StephenHodgson StephenHodgson deleted the MRTK-ForwardCompatibility2 branch October 3, 2017 17:46
}

Close();
}

protected override void LoadSettings()
{
for (int i = (int)SceneSetting.CameraToOrigin; i <= (int)SceneSetting.FieldOfView; i++)
for (int i = (int)SceneSetting.CameraToOrigin; i <= (int)SceneSetting.CameraToOrigin; i++)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This not starting from i=0 causes AddMixedRealityCamera to not appear in the menu

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #1072

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I had fixed this. Sorry about that. Must have slipped in my rebase retry.

@StephenHodgson StephenHodgson mentioned this pull request Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants